1
0
forked from clan/clan-core

Compare commits

...

1422 Commits

Author SHA1 Message Date
0027c46313 Merge pull request 'zerotier-static-peers: use correct exclusion source' (#1548) from kenji/clan-core:modules/fix/static into main
Reviewed-on: clan/clan-core#1548
2024-06-03 21:24:29 +00:00
ca2001040b zerotier-static-peers: use correct exclusion source 2024-06-03 22:53:44 +02:00
d6725100ac Merge pull request 'zerotier-static-peers: add guard condition' (#1547) from kenji/clan-core:modules/add/zerotier-guard into main
Reviewed-on: clan/clan-core#1547
2024-06-03 20:47:03 +00:00
503ce29c84 zerotier-static-peers: add guard condition 2024-06-03 22:42:04 +02:00
87444cd2b8 Merge pull request 'clan: add dyncamic completions for secrets' (#1546) from kenji/clan-core:kenji-clan/secrets-dynamic/add-completion into main
Reviewed-on: clan/clan-core#1546
2024-06-03 19:55:12 +00:00
31eca9e8bc clan: add dyncamic completions for secrets 2024-06-03 21:47:14 +02:00
822afe08b5 Merge pull request 'clan: add dynamic machine completions to clan secrets subcommands' (#1545) from clan/secrets/add-completions into main
Reviewed-on: clan/clan-core#1545
2024-06-03 15:42:37 +00:00
cfb78b0edb clan: add dynamic machine completions to clan secrets subcommands 2024-06-03 17:32:33 +02:00
65fd7d3efe Merge pull request 'clan: add dynamic completion to clan machines show' (#1544) from kenji-clan/machine-show/add-commpletion into main
Reviewed-on: clan/clan-core#1544
2024-06-03 15:15:45 +00:00
e8241fb7c9 clan: add dynamic completion to clan machines show 2024-06-03 17:06:03 +02:00
259d51bdc8 Merge pull request 'clan.static-hosts: excludeHosts should be empty if topLevelDomain is defined.' (#1538) from mrvandalo/clan-core:feature/static-hosts-exclude-nothing-when-tld-is-given into main
Reviewed-on: clan/clan-core#1538
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-06-03 10:44:41 +00:00
f6fb52afbf clan.static-hosts: excludeHosts should be empty if topLevelDomain is defined. 2024-06-03 10:44:41 +00:00
8089b87bbb Merge pull request 'Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."' (#1543) from lassulus/clan-core:lassulus-HEAD into main 2024-06-03 10:30:50 +00:00
578162425d Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."
This reverts commit ba86b49952.
2024-06-03 12:25:20 +02:00
dbad63f155 Merge pull request 'clan_cli secrets_upload: fix permissions' (#1542) from lassulus/clan-core:lassulus-HEAD into main 2024-06-03 08:58:49 +00:00
da8a733899 clan_cli secrets_upload: fix permissions 2024-06-03 10:52:18 +02:00
8f58f1998d Merge pull request 'Automatic flake update - 2024-06-03T00:00+00:00' (#1540) from flake-update-2024-06-03 into main 2024-06-03 00:05:17 +00:00
Clan Merge Bot
c43fe5187f update flake lock - 2024-06-03T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/10986091e47fb1180620b78438512b294b7e8f67' (2024-05-27)
  → 'github:nix-community/disko/0274af4c92531ebfba4a5bd493251a143bc51f3c' (2024-05-31)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8dc45382d5206bd292f9c2768b8058a8fd8311d9' (2024-05-16)
  → 'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/2478833ef8cc6de3d9e331f53b6f3682e425f207' (2024-05-27)
  → 'github:nix-community/nixos-images/47bfb55316e105390dd761e0b6e8e0be09462b67' (2024-05-30)
• Updated input 'nixos-images/nixos-2311':
    'github:NixOS/nixpkgs/0c007b36981bdbd69ccf0c7df30a174e63660667' (2024-05-26)
  → 'github:NixOS/nixpkgs/64e468fd2652105710d86cd2ae3e65a5a6d58dec' (2024-05-29)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4ae13643e7f2cd4bc6555fce074865d9d14e7c24' (2024-05-28)
  → 'github:NixOS/nixpkgs/6634a0509e9e81e980b129435fbbec518ab246d0' (2024-06-02)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/962797a8d7f15ed7033031731d0bb77244839960' (2024-05-26)
  → 'github:Mic92/sops-nix/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075' (2024-06-02)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/2fba33a182602b9d49f0b2440513e5ee091d838b' (2024-05-17)
  → 'github:numtide/treefmt-nix/3eb96ca1ae9edf792a8e0963cc92fddfa5a87706' (2024-06-01)
2024-06-03 00:00:22 +00:00
0993fe45f6 Merge pull request 'clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py' (#1536) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 14:56:41 +00:00
ba86b49952 clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py. 2024-06-02 16:52:31 +02:00
0b34c340fc Merge pull request 'clan-cli: Refactor machines/update.py to cmd.run' (#1535) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 08:04:18 +00:00
d513f66170 clan-cli: Refactor machines/update.py to cmd.run 2024-06-02 10:00:23 +02:00
320fb776ea Merge pull request 'clan-cli: Add input arg to cmd.run. Replace subprocess.run in password_store' (#1533) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 07:57:18 +00:00
1a39957dbb clan-cli: Refactor subprocess.run to cmd.run. tea-create-pr: Fix missing fail-on-change for treefmt 2024-06-02 09:53:24 +02:00
b5abe4025a Merge pull request 'docs: Add meta tags for link preview and fix js loading issue.' (#1531) from Qubasa/clan-core:Qubasa-main into main 2024-06-01 20:23:30 +00:00
55f4dcc460 docs: Add meta tags for link preview and fix js loading issue. 2024-06-01 22:19:37 +02:00
ef4a83f739 Merge pull request 'clan-core: add clan meta for ui usage' (#1529) from hsjobeki-main into main
Reviewed-on: clan/clan-core#1529
2024-05-31 16:26:46 +00:00
133f2b705f clan-core: add template to impure tests 2024-05-31 16:26:46 +00:00
83fe58e003 clan-core: add clan meta for ui usage 2024-05-31 16:26:46 +00:00
481f926b17 Merge pull request 'split list machines into show machine command' (#1521) from machines-show into main 2024-05-31 15:00:03 +00:00
788eae432a split list machines into show machine command 2024-05-31 16:56:09 +02:00
b7936c4ed2 Merge pull request 'upgrade nix in development to latest' (#1528) from nix-latest into main 2024-05-31 14:41:21 +00:00
750c8df003 upgrade nix in development to latest
Better error messages!!
2024-05-31 16:37:07 +02:00
276c39aba4 Merge pull request 'Contributing.md: Fix incorrect formating.' (#1527) from Qubasa/clan-core:Qubasa-main into main 2024-05-31 14:02:18 +00:00
90e25eeb76 Contributing.md: Fix incorrect formating. 2024-05-31 15:58:29 +02:00
56676701ae Merge pull request 'clan: add dynamic completions for fact generation services' (#1525) from a-kenji-clan/complete-services into main 2024-05-31 13:25:15 +00:00
bcccf301f0 clan: add dynamic completions for fact generation services 2024-05-31 15:21:07 +02:00
e343ba5635 Merge pull request 'Contributing.md: Explain merge-after-ci for externals.' (#1524) from Qubasa/clan-core:Qubasa-main into main 2024-05-31 12:02:02 +00:00
66fe5ec4fd Contributing.md: Explain merge-after-ci for externals. 2024-05-31 13:58:13 +02:00
f2a884ec30 Merge pull request 'clan: add completion timeout as static' (#1523) from a-kenji-clan/completions into main 2024-05-31 11:10:52 +00:00
d31aa7cf88 clan: add completion timeout as static 2024-05-31 13:06:46 +02:00
9f19a8e605 Merge pull request 'clan: add dynamic completions' (#1522) from a-kenji-clan/cli/init-dynamic-completions into main 2024-05-31 11:00:50 +00:00
23ef39a2d9 clan: add dynamic completions
Add dynamic completion scaffolding to the clan `cli`.
Also add a dynamic completion mechanism for machines for commands that
have machines as their sole argument.

More intricate dynamic completions will be implemented in follow up
PR's.
2024-05-31 12:55:41 +02:00
dda82c49b0 Merge pull request 'tea-create-pr: Add automatic rebase and autostash' (#1518) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 22:03:38 +00:00
c91c90a2a6 tea-create-pr: Add automatic rebase and autostash 2024-05-30 23:59:27 +02:00
5794cdf8fa Merge pull request 'docs: Fix installer wrong indentation' (#1516) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 21:44:41 +00:00
01a4748d6b tea-create-pr: Fix non working assignees label 2024-05-30 23:37:53 +02:00
a8762522c8 tea-create-pr: Better username detection 2024-05-30 23:29:59 +02:00
adef52a938 docs: Fix installer wrong indentation 2024-05-30 22:41:30 +02:00
c8fbf87fc8 Merge pull request 'Change clan favicon to one without text' (#1506) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 20:30:02 +00:00
f63e3618c2 tea-create-pr: Require fork and upstream branch 2024-05-30 22:25:25 +02:00
b18d7bfeac Change clan favicon to one without text 2024-05-30 21:59:48 +02:00
076b98ff00 Merge pull request 'Webview: css font and icon import transformation' (#1501) from hsjobeki-main into main 2024-05-30 16:28:14 +00:00
6999685bba
Webview: css font and icon import transformation 2024-05-30 18:23:49 +02:00
f1c02bbd46 Merge pull request 'Add top level domain option for zerotier machines.' (#1499) from mrvandalo/clan-core:feature/static-host-tld into main
Reviewed-on: clan/clan-core#1499
2024-05-29 18:40:15 +00:00
2caa837537 Add top level domain option for zerotier machines. 2024-05-29 18:40:15 +00:00
e1ddbf226a Merge pull request 'install.sh: improvements' (#1500) from DavHau-install-dev into main 2024-05-29 18:03:50 +00:00
7cb8c114c2 install.sh: improvements
- use either curl or wget
- add to PATH /nix/var/nix/profiles/default/bin
2024-05-29 18:51:34 +02:00
5945630870 Merge pull request 'gui-installer: depend on git + ignore flake config' (#1498) from DavHau-dave into main 2024-05-29 15:48:54 +00:00
ccadac4bb3 gui-installer: depend on git + ignore flake config 2024-05-29 17:42:44 +02:00
15b77f6b8a Merge pull request 'Webview: bootstrap layout' (#1497) from hsjobeki-main into main 2024-05-29 14:45:45 +00:00
9bf76037aa
Webview: bootstrap layout 2024-05-29 16:40:54 +02:00
d0d973b797 Merge pull request 'make config command read-only' (#1319) from config into main
Reviewed-on: clan/clan-core#1319
2024-05-29 11:25:27 +00:00
c1e2bc9ea9 make config command read-only 2024-05-29 13:17:55 +02:00
0eef21e2ef Merge pull request 'Update flakes' (#1492) from pass-nix-options into main 2024-05-29 10:58:19 +00:00
461aa579c2 fmt more stuff 2024-05-29 12:51:43 +02:00
da442c47f6 drop non-compiling wayland-proxy-virtwl 2024-05-29 12:51:18 +02:00
491d37ea67 update flake 2024-05-29 12:51:04 +02:00
7e087d18ee Merge pull request 'fix offline build of flash command' (#1491) from pass-nix-options into main 2024-05-29 10:49:15 +00:00
5c75a6490b fix offline build of flash command 2024-05-29 12:45:50 +02:00
750b6aec59 flash: make configuration more explicit
Injecting nixos configuration and potentially overriding settings a user
made and can cause surprises.
In most cases, users want to just make these option part of their NixOS
configuration and by having the rest in the command line
we make it more explicit what other configuration is being applied.
2024-05-29 12:45:50 +02:00
d138e29a53 Merge pull request 'Consistently pass nix options to underlying tools' (#1488) from pass-nix-options into main 2024-05-29 08:25:53 +00:00
a7febba9c8 Merge pull request 'clan: clarify default backend' (#1490) from a-kenji-cli/facts-clarify into main 2024-05-29 08:23:06 +00:00
f0f97baa65 drop global argparse flags
They get shadowed by subargparser options.
2024-05-29 10:21:35 +02:00
c2dc94507e clan: clarify default backend 2024-05-29 10:17:22 +02:00
7c0aaab463 Merge pull request 'clan: add epilog to facts subcommands' (#1489) from a-kenji-cli/expand-examples into main 2024-05-29 08:15:46 +00:00
5dcac604d1 backup cli: make sure we have a flake 2024-05-29 10:14:14 +02:00
96746b7c98 flash: add write-efi-boot-entries flag 2024-05-29 10:14:14 +02:00
2ae50b7398 allow to override nix options in update/install/flash commands 2024-05-29 10:14:14 +02:00
3c905c5072 clan: add epilog to facts subcommands 2024-05-29 10:10:23 +02:00
5b926f57cc cli: also register common flags in subcommands
When a user runs --help on a subcommand they don't see some options such
as --options or --flake. To fix this we now register all common flags
also in subcommands.
2024-05-29 09:29:49 +02:00
b9788a5dba Merge pull request 'clan/docs.py: remove epilog from the reference overview' (#1487) from a-kenji-cli/docs/reference-overview into main 2024-05-28 18:05:07 +00:00
7078f09872 clan/docs.py: remove epilog from the reference overview 2024-05-28 20:01:48 +02:00
1aa7808c02 Merge pull request 'Update Contributing guide to external developers' (#1484) from Qubasa/clan-core:main into main
Reviewed-on: clan/clan-core#1484
2024-05-28 16:12:11 +00:00
ba8a51101d Update Contributing guide to external developers 2024-05-28 18:06:31 +02:00
de69c970aa Merge pull request 'packaging: package clan gui for many distros' (#1485) from DavHau-dave into main 2024-05-28 15:54:08 +00:00
fe5fa6a85d packaging: package clan gui for many distros 2024-05-28 17:50:32 +02:00
de74febf64 Merge pull request 'packaging: package clan gui for many distros' (#1483) from DavHau-dave into main 2024-05-28 15:37:18 +00:00
3b6483e819 packaging: package clan gui for many distros 2024-05-28 17:33:55 +02:00
dcd6ad0983 Merge pull request 'Docs: fix relative links to git.clan.lol' (#1482) from hsjobeki-main into main 2024-05-28 15:18:45 +00:00
567d979243
Docs: fix relative links to git.clan.lol 2024-05-28 17:14:16 +02:00
c81a8681b0 Merge pull request 'clan/docs.py: add epilog to reference docs' (#1481) from a-kenji-docs/epilog into main 2024-05-28 15:13:57 +00:00
31cde90819 clan/docs.py: add epilog to reference docs
Fixes #1469
2024-05-28 17:08:46 +02:00
a77bf5bf21 Merge pull request 'Docs: use offline fonts' (#1480) from hsjobeki-main into main 2024-05-28 15:05:22 +00:00
4befa80eb8
Docs: use offline fonts 2024-05-28 16:58:59 +02:00
52584662a8 Merge pull request 'Fix typos' (#1477) from a-kenji-fix/typos into main 2024-05-28 13:02:19 +00:00
de147f63e9 Fix typos 2024-05-28 14:58:38 +02:00
96c33dec7a Merge pull request 'consistent rename cLAN -> Clan' (#1475) from rename into main 2024-05-28 11:38:57 +00:00
3c0b5f0867 drop deprecated mdDoc 2024-05-28 13:35:11 +02:00
c252f11c1f Merge pull request 'docs/secrets: improve chapter assigning access' (#1474) from DavHau-dave into main 2024-05-28 11:11:46 +00:00
f1f040397d docs/secrets: improve chapter assigning access
Since we already walk the user through creating a secret in an earlier step, it makes more sense explain first how to add machines/users to an existing secret instead of creating  a new one
2024-05-28 13:08:19 +02:00
418e9937cb Merge pull request 'clan: add descriptions for reference documentation' (#1473) from a-kenji-cli/doc into main 2024-05-28 09:40:50 +00:00
c34664429c clan: add descriptions for reference documentation 2024-05-28 11:37:32 +02:00
6fe5928297 Merge pull request 'clan: add run_no_stdout function suppressing stdout' (#1472) from a-kenji-run_no_stdout into main 2024-05-28 09:17:14 +00:00
eee99730d1 clan: add run_no_stdout function suppressing stdout
Add the `run_no_stdout` function suppressing stdout by default.This
keeps the noise down on most commands, while still
stayingdebuggable.Stdout will be active when the `--debug` flag is
passed to the cli.

Fixes #1443
2024-05-28 11:13:55 +02:00
9394760e3b Merge pull request 'editor: improve nixpkgs option completions' (#1470) from a-kenji-improve/editor into main 2024-05-28 07:38:09 +00:00
a0b0e1a0ac editor: improve nixpkgs option completions 2024-05-28 09:34:57 +02:00
dbaa26ccaa Merge pull request 'clan: machines --help add examples to help output' (#1468) from a-kenji-clan/cli/machines-examples into main 2024-05-27 19:04:30 +00:00
d1591d4485 clan: machines --help add examples to help output 2024-05-27 21:01:05 +02:00
c68a8306ba Merge pull request 'clan: duplicate description field for generation of the reference documentation' (#1467) from a-kenji-clan/cli/add-description into main 2024-05-27 18:32:54 +00:00
ec9f605004 clan: duplicate description field for generation of the reference documentation 2024-05-27 20:29:34 +02:00
e60efea1f7 Merge pull request 'clan: ssh --help add examples' (#1466) from a-kenji-clan/help/ssh into main 2024-05-27 18:18:08 +00:00
efacb7f184 clan: ssh --help add examples
Add examples to the output of `clan ssh --help`.
2024-05-27 20:14:37 +02:00
67275aac63 Merge pull request 'clan: rename cLan to clan' (#1465) from a-kenji-rename-clan into main 2024-05-27 17:56:32 +00:00
a704a05b15 clan: rename cLan to clan 2024-05-27 19:52:51 +02:00
01aafc520d Merge pull request 'consistent rename cLAN -> Clan' (#1464) from rename into main
Reviewed-on: clan/clan-core#1464
2024-05-27 13:58:32 +00:00
c0a54f539a consistent rename cLAN -> Clan 2024-05-27 13:58:32 +00:00
e2d7e6e86c consistent rename cLAN -> Clan 2024-05-27 15:54:17 +02:00
1df4e361f7 Merge pull request 'clan: add examples and description to most help' (#1463) from a-kenji-clan/examples into main 2024-05-27 12:37:22 +00:00
e8bd5ad24b clan: add examples and description to most help
Add examples and description to most toplevel help outputs.
2024-05-27 14:33:58 +02:00
775f993ecc Merge pull request 'clan-cli: Fix nix develop not working in template because of symlink' (#1462) from Qubasa-main into main 2024-05-27 12:05:17 +00:00
0e1478edcd clan-cli: Fix nix develop not working in template because of symlink 2024-05-27 14:00:31 +02:00
bfc1203a8a Merge pull request 'init: vscode .#editor' (#1461) from Qubasa-init/editors into main 2024-05-27 12:00:26 +00:00
2bd8b144b9 init: vscode .#editor 2024-05-27 13:52:54 +02:00
b52b2221b0 Merge pull request 'drop offline in nix shell' (#1459) from fix-mass-rebuilds into main 2024-05-27 11:43:32 +00:00
64adf17368 drop offline in nix shell
Otherwise we become gentoo!
2024-05-27 13:40:11 +02:00
509d8c1dae Merge pull request 'make git-hooks opt-in' (#1453) from git-hooks into main 2024-05-27 10:34:07 +00:00
295de17640 Merge pull request 'docs: secrets: list the main steps of the guide' (#1456) from DavHau-dave into main 2024-05-27 10:05:55 +00:00
b158c2706f docs: secrets: list the main steps of the guide
... so the user has a routh idea about the mein steps
2024-05-27 12:02:29 +02:00
750979c988 Merge pull request 'A Kenji Clan/Cli/Fix Naming' (#1455) from a-kenji-clan/cli/fix-naming into main 2024-05-27 09:54:36 +00:00
6d7849a03c clan: fix description of cli tool 2024-05-27 11:51:25 +02:00
f46fd3ace6 make git-hooks opt-in
pre-commit hook break git commits and are disruptive.
Therefore people that want to enable this feature, should enable it locally instead.
I.e. treefmt will also check untracked files that are not meant for the current commit.
2024-05-27 11:08:17 +02:00
6e9f1515d3 Merge pull request 'clan: facts generate allow regeneration of facts' (#1447) from a-kenji-clan/feat/facts-regenerate-1403 into main 2024-05-26 21:00:38 +00:00
81e0700826 clan: facts generate allow regeneration of facts
Add `--regenerate` flag to `clan facts generate` which allows forcing
the generation of facts, regardless of their current existence.

Examples:
```
clan facts generate [MACHINE] --regenerate
```
or
```
clan facts generate [MACHINE] --service [SERVICE] --regenerate
```
2024-05-26 22:55:48 +02:00
4daf036a3c Merge pull request 'clan: facts generate specific service' (#1446) from a-kenji-feat/clan/facts-generate-service-1395 into main 2024-05-26 19:57:17 +00:00
4faab0a20f clan: facts generate specific service
Add `--service` flag to the `clan` cli which allows specifying a certain
service to be generated.

Example:

```
clan facts generate [MACHINE] --service [SERVICE]
```

Fixes #1395
2024-05-26 21:52:56 +02:00
76622557c4 Merge pull request 'Webview: improve linting & typechecks' (#1445) from hsjobeki-main into main 2024-05-26 16:41:11 +00:00
4c4c94c508
Webview: improve linting & typechecks 2024-05-26 18:37:29 +02:00
b0d5ef01ca Merge pull request 'Api: init response envelop' (#1444) from hsjobeki-feat/api-improvements into main 2024-05-26 16:08:02 +00:00
ab656d5655
API: handle functions with multiple arguments 2024-05-26 18:04:49 +02:00
ed171f0264
Api: init response envelop 2024-05-26 15:57:10 +02:00
270f9d54cb Merge pull request 'clan: fix clan facts list [MACHINE]' (#1442) from a-kenji-fix/clan-facts-list into main 2024-05-26 12:29:37 +00:00
73f486fe13 clan: fix clan facts list [MACHINE]
Fix `clan facts list [MACHINE]`.
The get command returned a dictionary of bytestrings.
We now convert them to strings.
2024-05-26 14:26:08 +02:00
7da6826344 Merge pull request 'api: improve message serialisation' (#1440) from hsjobeki-feat/api-improvements into main 2024-05-26 12:20:11 +00:00
f54c518fd7
api: fix breaking tests 2024-05-26 14:17:17 +02:00
522fd1bcaa
api: convert name casing 2024-05-26 13:54:21 +02:00
be5c3accfe
webview: fix typo 2024-05-26 13:41:07 +02:00
3998efac78
fix: tests 2024-05-26 13:41:05 +02:00
691ae9fb15
api: improve message serialisation 2024-05-26 13:40:47 +02:00
fc8a64ef49 Merge pull request 'Add draft: Git Based Machine Deployment with Clan-Core' (#1439) from Qubasa-main into main 2024-05-25 16:37:39 +00:00
c0f3810e01 Add draft: Git Based Machine Deployment with Clan-Core 2024-05-25 18:34:19 +02:00
39d8cf91cf Merge pull request 'blog: fix typos' (#1436) from a-kenji-fix/typos-1 into main 2024-05-25 10:34:05 +00:00
233b973120 blog: fix typos 2024-05-25 11:57:28 +02:00
f3f2f6df69 Merge pull request 'blog: fix typo on jsonschema post' (#1435) from DavHau-dave into main 2024-05-25 08:41:03 +00:00
ec824becc8 blog: fix typo on jsonschema post 2024-05-25 10:37:56 +02:00
7fbb50fcc8 Merge pull request 'blog: add link for discourse comments' (#1434) from DavHau-dave into main 2024-05-25 07:47:56 +00:00
33695f7470 blog: add link for discourse comments 2024-05-25 09:44:49 +02:00
001ed3283a Merge pull request 'blog: custom slug for jsonschema converter post' (#1433) from DavHau-dave into main 2024-05-25 07:37:54 +00:00
9ae7d4a24b blog: custom slug for jsonschema converter post 2024-05-25 09:34:50 +02:00
e39911d99c Merge pull request 'blog: improve description of jsonschema post' (#1432) from DavHau-dave into main 2024-05-25 07:12:35 +00:00
9c3da78792 blog: improve description of jsonschema post 2024-05-25 09:09:20 +02:00
69ddda24c9 Merge pull request 'blog: add jsonschema blog post' (#1431) from DavHau-dave into main 2024-05-25 07:01:10 +00:00
c6f078fafc blog: add jsonschema blog post 2024-05-25 08:57:57 +02:00
4e3ed011da Merge pull request 'blog: Remove asciinema player' (#1430) from Qubasa-main into main 2024-05-24 15:13:58 +00:00
a71191486c blog: Fix remote url 2024-05-24 17:10:47 +02:00
d3e6276d04 Merge pull request 'blog: Remove asciinema player' (#1429) from Qubasa-main into main 2024-05-24 14:58:52 +00:00
a1e2d1017e blog: Remove asciinema player 2024-05-24 16:57:26 +02:00
114b0b02d0 blog: Remove asciinema player 2024-05-24 16:54:51 +02:00
de3e133981 Merge pull request 'blog: Remove pictures.' (#1428) from Qubasa-main into main 2024-05-24 13:53:28 +00:00
083e30f468 blog: Remove pictures. 2024-05-24 15:50:14 +02:00
d7ef88c67c Merge pull request 'add-pre-commit' (#1413) from fricklerhandwerk/clan-core:add-pre-commit into main
Reviewed-on: clan/clan-core#1413
2024-05-24 12:39:56 +00:00
055b17c01b add pre-commit check
make sure things are sane before they hit CI, re-purposing the existing
treefmt configuration.

this adds a custom installer for pre-commit hooks, which is inspired by
pre-commit.nix[0], but is much more minimal than the underlying
pre-commit[1] and builds on a historic idea[2] from this repository.

[0]: https://github.com/cachix/git-hooks.nix
[1]: https://github.com/pre-commit/pre-commit
[2]: 930923512c
2024-05-24 12:39:56 +00:00
4b07bf363b Merge pull request 'documentation: add keys' (#1426) from a-kenji-add-keys into main 2024-05-24 11:49:09 +00:00
97928801f9 documentation: add keys 2024-05-24 13:46:05 +02:00
fdacfb8ecf Merge pull request 'documenation: use monospace font for code blocks' (#1425) from a-kenji-fix-monospace into main 2024-05-24 11:11:02 +00:00
508a26d68d documenation: use monospace font for code blocks
Use monospace font for code blocks.

Fixes: #1337
2024-05-24 13:08:00 +02:00
8055c21984 Merge pull request 'clan machines list: reduce noise' (#1418) from a-kenji-fix/output-noisy/1115 into main 2024-05-24 10:58:13 +00:00
9bb6ed313f clan machines list: reduce noise
Don't log nix error output by default on `clan machines list`.
Log it, if `--debug` is passed.

Fixes #1115
2024-05-24 12:55:14 +02:00
8c36df77cc Merge pull request 'documentation: improve legibility of command output' (#1423) from a-kenji-fix/lsblk into main 2024-05-24 10:40:34 +00:00
2284b060be documentation: improve legibility of command output
Improve legibility of command output.
2024-05-24 12:37:27 +02:00
491b5d28f2 Merge pull request 'documenation: fix flake-parts what's next section' (#1422) from a-kenji-fix/docs/flake-parts into main 2024-05-24 10:14:55 +00:00
bf212ce9c4 documenation: fix flake-parts what's next section 2024-05-24 12:11:42 +02:00
35be09feaa Merge pull request 'impure-checks: unset CLAN_DIR' (#1420) from a-kenji-fix/env into main 2024-05-24 10:06:10 +00:00
4ee90b4b9f impure-checks: unset CLAN_DIR
Unset `CLAN_DIR` in the impure checks, so that it won't reference the
users configuration.

Fixes #1419
2024-05-24 12:03:11 +02:00
cab69935ef Merge pull request 'lib.jsonschema: parse some more types' (#1417) from DavHau-dave into main 2024-05-23 14:17:56 +00:00
54fcfda43e lib.jsonschema: parse some more types 2024-05-23 16:12:49 +02:00
d137342243 Merge pull request 'modules: init trusted-nix-cache module' (#1414) from a-kenji-add/cache-module into main 2024-05-23 07:32:36 +00:00
3eba6e85cc modules: init trusted-nix-cache module 2024-05-23 09:29:31 +02:00
d395e2abf3 Merge pull request 'flake.nix: change disko back to nix-community' (#1409) from change_disko_input into main 2024-05-22 19:17:48 +00:00
b971156df1 flake.nix: change disko back to nix-community 2024-05-22 21:14:30 +02:00
c885a3fec8 Merge pull request 'Revert "Merge pull request 'add pre-commit-check' (#1369) from fricklerhandwerk/clan-core:add-pre-commit into main"' (#1408) from Qubasa-revert_hooks into main 2024-05-22 12:36:23 +00:00
ae7794dddd Revert "Merge pull request 'add pre-commit-check' (#1369) from fricklerhandwerk/clan-core:add-pre-commit into main"
This reverts commit acaa69e2bf, reversing
changes made to a78f5b2bec.
2024-05-22 14:31:53 +02:00
acaa69e2bf Merge pull request 'add pre-commit-check' (#1369) from fricklerhandwerk/clan-core:add-pre-commit into main
Reviewed-on: clan/clan-core#1369
2024-05-22 11:49:57 +00:00
e37f7e2760 use a custom installer for pre-commit hooks 2024-05-22 11:49:57 +00:00
245b615209 add pre-commit check
make sure things are sane before they hit CI.
this re-purposes the existing treefmt configuration.
2024-05-22 11:49:57 +00:00
a78f5b2bec Merge pull request 'zerotier-static-peers: init module' (#1400) from a-kenji-modules/init/static-zerotier-hosts into main 2024-05-22 10:40:41 +00:00
396caeff39 zerotier-static-peers: init module
Init zerotertier-static-peers module.
This module automatically configures the networkId.
It will automatically accept peers based on their zerotier-ips in the
clan flake.
2024-05-22 12:37:13 +02:00
d5a639104d Merge pull request 'user-password: set prompt to true by default' (#1399) from a-kenji-user-password/on-by-default into main 2024-05-22 10:19:04 +00:00
fb1b428c12 user-password: set prompt to true by default 2024-05-22 12:15:26 +02:00
bfe37c2457 Merge pull request 'modules: static hosts filter nonexistent ip' (#1398) from a-kenji-fix/path-loading into main 2024-05-21 15:28:52 +00:00
39b34d9ff3 modules: static hosts filter nonexistent ip 2024-05-21 17:24:14 +02:00
fd29ed4693 Merge pull request 'zerotier-members: fix joining by member ip' (#1397) from a-kenji-fix/by-ip into main 2024-05-21 14:42:35 +00:00
9db4e5cf2f zerotier-members: fix joining by member ip 2024-05-21 16:39:28 +02:00
e28a02ec73 Merge pull request 'clan ui: setup typed api method' (#1391) from hsjobeki-main into main 2024-05-21 14:06:45 +00:00
c1e7e25641
api: fix typing issues 2024-05-21 16:01:57 +02:00
21104a0465
webview: replace dream2nix by buildNpm from nixpkgs to save inputs 2024-05-21 15:52:20 +02:00
0f53475499 Merge pull request 'documentation: remove references to Icons for introductory material' (#1392) from a-kenji-rm/icon into main 2024-05-21 09:19:51 +00:00
7aa85d8aaf documentation: remove references to Icons for introductory material
The icons are not yet used in this path.
This is unneccessary overhead for new users, with no payoff yet.
2024-05-21 11:16:12 +02:00
e9b0ce6a78
clan ui: add check to build script 2024-05-21 10:09:05 +02:00
d174fbd445
clan ui: move print into log.debug statements 2024-05-20 19:59:50 +02:00
8687801cee
clan ui: setup typed api method 2024-05-20 19:34:49 +02:00
6ebfd29c87 Merge pull request 'clanModule.sshd: Deactivate password auth. Change flake template to every machine having its own disko.nix file.' (#1389) from Qubasa-main into main 2024-05-20 17:14:24 +00:00
c8456f7d68 clanModule.sshd: Deactivate password auth. Change flake template to every machine having its own disko.nix file. 2024-05-20 19:11:12 +02:00
6b03645f7a Merge pull request 'clan-ui: rollback default view until webview is ready' (#1388) from feat/ui into main 2024-05-20 09:11:35 +00:00
2cb7adb377
clan-ui: rollback default view until webview is ready 2024-05-20 11:08:14 +02:00
78ab7ebc7f Merge pull request 'Automatic flake update - 2024-05-20T00:00+00:00' (#1387) from flake-update-2024-05-20 into main 2024-05-20 00:03:44 +00:00
Clan Merge Bot
82a4ecf82b update flake lock - 2024-05-20T00:00+00:00
Flake lock file updates:

• Updated input 'dream2nix':
    'github:nix-community/dream2nix/995e831dac8c2c843f1289d15dfec526cb84afdd' (2024-05-14)
  → 'github:nix-community/dream2nix/f28d1cc6898532ac331a1625628090dc7c5b02e2' (2024-05-19)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e' (2024-05-02)
  → 'github:hercules-ci/flake-parts/8dc45382d5206bd292f9c2768b8058a8fd8311d9' (2024-05-16)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/722b512eb7e6915882f39fff0e4c9dd44f42b77e' (2024-04-22)
  → 'github:nix-community/nixos-generators/a63e0c83dd83fe28cc571b97129e13373436bd82' (2024-05-19)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/81e709ca1da9c5c31b65cc8f82a97181f78ec076' (2024-05-13)
  → 'github:nix-community/nixos-images/8c9cab8c44434c12dafc465fbf61a710c5bceb08' (2024-05-19)
• Updated input 'nixos-images/nixos-2311':
    'github:NixOS/nixpkgs/6eccabe980dcb2048aab7f97f862fb6d79b98abe' (2024-05-12)
  → 'github:NixOS/nixpkgs/95742536dc6debb5a8b8b78b27001c38f369f1e7' (2024-05-16)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c029b7f004009923bbfc90bbc31263cd4b08759f' (2024-05-15)
  → 'github:NixOS/nixpkgs/8a2555763c48e2410054de3f52f7310ce3241ec5' (2024-05-19)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e' (2024-05-12)
  → 'github:Mic92/sops-nix/0bf1808e70ce80046b0cff821c019df2b19aabf5' (2024-05-19)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/c6aaf729f34a36c445618580a9f95a48f5e4e03f' (2024-04-25)
  → 'github:numtide/treefmt-nix/2fba33a182602b9d49f0b2440513e5ee091d838b' (2024-05-17)
2024-05-20 00:00:21 +00:00
43b56e21b2 Merge pull request 'zerotier-members: allow joining by zerotier ip' (#1386) from a-kenji-main into main 2024-05-19 21:16:24 +00:00
a47c2f3e69 zerotier-members: allow joining by zerotier ip 2024-05-19 23:13:26 +02:00
a34fa4f69b Merge pull request 'init: static-hosts module' (#1385) from a-kenji-init/statix-hosts-module into main 2024-05-19 11:09:54 +00:00
e13217b1c9 Merge pull request 'user-password: fix module path' (#1384) from a-kenji-fix/user-passord-module into main 2024-05-19 11:08:42 +00:00
1e4a3a3eee user-password: fix module path
Fixes #1381
2024-05-19 13:03:47 +02:00
e39d8cb909 init: static-hosts module 2024-05-19 13:01:37 +02:00
7c48730bbb Merge pull request 'clan flash: Use latest kernel with zfs support. bcachefs supported too.' (#1379) from Qubasa-main into main 2024-05-18 21:50:26 +00:00
da5f363bee clan flash: Use latest kernel with zfs support. bcachefs supported too. 2024-05-18 23:47:17 +02:00
24ec74ae37 Merge pull request 'Add bcachefs support. Fix clan flash docu.' (#1378) from Qubasa-main into main 2024-05-18 21:21:14 +00:00
64a98281f0 Add bcachefs support. Fix clan flash docu. 2024-05-18 23:18:02 +02:00
5863ddca0e Merge pull request 'init webview: add webview ui and list machine as api example' (#1365) from feat/ui into main
Reviewed-on: clan/clan-core#1365
2024-05-18 14:14:12 +00:00
5de3ab88e9 devShell: fallback for darwin 2024-05-18 14:14:12 +00:00
4cfc335e2c fix: segfault gtk when using webkit 2024-05-18 14:14:12 +00:00
e25bd69c68 clan ui: override webkitgtk unbroken on darwin. 2024-05-18 14:14:12 +00:00
fe17f9e1a1 clan ui: integrate webview ui into clan-mananger-gtk 2024-05-18 14:14:12 +00:00
7980f13bed add webview threaded api 2024-05-18 14:14:12 +00:00
fef16a84a9 init webview: add webview ui and list machine as api example 2024-05-18 14:14:12 +00:00
97a1d8b52a Merge pull request 'Change favicon. Add socials. Add RSS link.' (#1372) from Qubasa-main into main 2024-05-17 14:10:22 +00:00
f9b32cbd09 Change favicon. Add socials. Add RSS link. 2024-05-17 16:07:14 +02:00
4d66f2a14c Merge pull request 'readme: Update matrix link' (#1371) from Qubasa-main into main 2024-05-16 18:42:35 +00:00
473c236214 Fix rss plugin warning 2024-05-16 20:39:39 +02:00
eeaf1c84a9 Add profile picture for W 2024-05-16 19:43:55 +02:00
f6efd11eae Working dark theme switcher 2024-05-16 19:32:05 +02:00
8762ee4420 Migrated blog to mkdocs 2024-05-16 15:08:24 +02:00
0568608be6 readme: Update matrix link 2024-05-15 23:00:08 +02:00
a0194f34d2 Merge pull request 'ssh-flash & documentation' (#1350) from ssh-flash into main 2024-05-15 20:58:02 +00:00
b3297532ad nix flake update & disable checks.flash-installer 2024-05-15 22:54:38 +02:00
cd915e171f template: Throw error on missing ssh pub key 2024-05-14 18:29:04 +02:00
1e94bf02da Add nix flake check remark to docu 2024-05-14 18:20:56 +02:00
1c2781267b Add clan flash documentation. 2024-05-14 16:13:50 +02:00
ac8162a08d Fix doc build error 2024-05-14 15:41:15 +02:00
1476619515 Renamed machines.md to deploy.md 2024-05-14 15:41:15 +02:00
8288048682 Renamed machines.md to deploy.md 2024-05-14 15:41:15 +02:00
fd41badbc6 Add --no-reboot flag to clan machine install 2024-05-14 15:41:15 +02:00
d574faf253 Heavily improve documentation and flake template 2024-05-14 15:41:15 +02:00
81522c96e5 Fix missing efi and x64 support in template 2024-05-14 15:41:15 +02:00
e668a7f536 Fix build error 2024-05-14 15:41:15 +02:00
3293ac0c14 fix get_keymap_and_locale 2024-05-14 15:41:15 +02:00
be841cdec2 Removed ssh password login 2024-05-14 15:41:15 +02:00
49e39ec505 Add keymap and language detection 2024-05-14 15:41:15 +02:00
c25f7934ba clan flash: Copied network-status from nixos-images into installer 2024-05-14 15:41:15 +02:00
4f6d25160f Add --ssh-pubkey FILE argument 2024-05-14 15:41:15 +02:00
0bf9a566eb Merge pull request 'clan-cli(docs): modularize in preparation for manpage generation' (#1361) from a-kenji-docs/modularize into main 2024-05-14 10:21:44 +00:00
148a0c90cc clan-cli(docs): modularize in preparation for manpage generation 2024-05-14 12:18:37 +02:00
789bf3d0c8 Merge pull request 'docs: remove linenums from every code block' (#1360) from a-kenji-docs-patch-8 into main 2024-05-14 09:39:14 +00:00
59c558ffc6 docs: remove linenums from every code block
Remove linenums from every single code block.
Makes site considerably less busy and easier to read.
2024-05-14 11:32:30 +02:00
c5e62074a6 Merge pull request 'docs: user-password add admonition' (#1359) from a-kenji-docs/fix into main 2024-05-14 09:31:53 +00:00
9999379f81 docs: user-password add admonition 2024-05-14 11:29:07 +02:00
dd1cfe3834 Merge pull request 'modules: init user-password' (#1358) from a-kenji-modules/init/user-password into main 2024-05-14 08:58:37 +00:00
cd0b360b49 modules: init user-password
Init a user-password module, that allows setting the password for a
single user.

fixes #1351
2024-05-14 10:55:43 +02:00
8c0fb90c1a Merge pull request 'Reorder getting started documentation' (#1345) from Qubasa-main into main 2024-05-10 21:02:33 +00:00
86ae7cbbfb Reorder getting started documentation 2024-05-10 22:59:45 +02:00
fdf63fd605 Merge pull request 'Fix template. Improve docu. Add disko as default imported module.' (#1342) from Qubasa-main into main 2024-05-10 13:42:12 +00:00
82fa89b57e Fix template. Improve docu. Add disko as default imported module. 2024-05-10 15:39:46 +02:00
cad492e830 Merge pull request 'fix docs .envrc watch_file' (#1339) from Qubasa-main into main 2024-05-09 13:05:34 +00:00
2abd5bbe37 fix docs .envrc watch_file 2024-05-09 15:00:03 +02:00
aad130166f Merge pull request 'hsjobeki-main' (#1332) from hsjobeki-main into main 2024-05-08 10:30:16 +00:00
3e9a1ea68f
vm-manager: hide hidden vm log info 2024-05-08 12:27:16 +02:00
2acd06c9fa
docs: add faq page 2024-05-08 12:23:04 +02:00
f45d3385c2 Merge pull request 'template: fix disko devices' (#1328) from a-kenji-docs-patch-7 into main 2024-05-07 20:48:50 +00:00
23c9291912 template: fix disko devices 2024-05-07 22:46:15 +02:00
1893ebef19 Merge pull request 'docs: simplify hardware-configuration' (#1326) from a-kenji-docs-patch-5 into main 2024-05-07 19:40:06 +00:00
fd00a941dc docs: simplify hardware-configuration 2024-05-07 21:37:25 +02:00
9ab5a9507d Merge pull request 'docs: add tip for wlan configuration' (#1325) from a-kenji-docs-patch-4 into main 2024-05-07 19:29:11 +00:00
1a4c20e49e add: tip 2024-05-07 21:26:15 +02:00
f138e59da8 Merge pull request 'docs: add reference to the help page' (#1324) from a-kenji-docs-patch-3 into main 2024-05-07 18:47:50 +00:00
ddd9318ea1 docs: add reference to the help page 2024-05-07 20:45:09 +02:00
aee2fdcffa Merge pull request 'docs: improve getting started prerequisite docs' (#1322) from a-kenji-docs-patch-2 into main 2024-05-07 13:48:22 +00:00
d1b810dfad docs: improve getting started prerequisite docs 2024-05-07 15:45:38 +02:00
4dede0ee5c Merge pull request 'docs: add link to cli reference' (#1321) from a-kenji-improve/docs into main 2024-05-07 13:37:40 +00:00
3506d6ba0d docs: add link to cli reference 2024-05-07 15:34:56 +02:00
f2a3415e2c Merge pull request 'clan-cli: add --json and --png flags to machine install' (#1320) from a-kenji-feat/clan-install-json into main 2024-05-07 12:52:21 +00:00
2e821c4525 clan-cli: add --json and --png flags to machine install
Allow using `clan machines [machine] install` in conjunction with the
`--json` and `--png` flags.

Fixes #1180
2024-05-07 14:47:13 +02:00
bbba7e9087 Merge pull request 'disko module: add default for singleDiskExt4' (#1300) from hsjobeki-main into main 2024-05-07 11:29:19 +00:00
15dd4ea25f
cli-docs: add automatic markdown cli docs 2024-05-07 13:26:33 +02:00
5a6eeda125
disko module: add default for singleDiskExt4 2024-05-07 13:11:04 +02:00
f8e08a610e Merge pull request 'Add jsonschema test case' (#1309) from Qubasa-main into main 2024-05-04 12:14:07 +00:00
fc7f544199 Fix invalid jsonschema testcase 2024-05-04 14:11:28 +02:00
8aaa95737a Merge pull request 'ci: Change from deploy on pull_request to deploy on main push' (#1313) from Qubasa-autodeploy into main
Reviewed-on: clan/clan-core#1313
2024-05-04 11:42:45 +00:00
7dedae9920 ci: Change from deploy on pull_request to deploy on main push 2024-05-04 13:42:16 +02:00
01e5b02633 Merge pull request 'ci: Change from deploy on pull_request to deploy on main push' (#1312) from Qubasa-autodeploy into main 2024-05-04 11:40:49 +00:00
f4de3ac83d ci: Change from deploy on pull_request to deploy on main push 2024-05-04 13:37:56 +02:00
9e65cf2b5b Merge pull request 'gitea_action: Add docs.clan.lol auto deploy' (#1311) from Qubasa-autodeploy into main 2024-05-04 11:34:28 +00:00
8134583641 Remove print of priv key in ci 2024-05-04 13:31:30 +02:00
5d8ee29ed4 Merge branch 'fix_secrets' into autodeploy 2024-05-04 13:12:17 +02:00
d9ce211d1a secrets: Fix test failure through flake update 2024-05-04 13:11:37 +02:00
9ec8b71765 moonlight-sunshine-accept: Fix formatting error 2024-05-03 20:38:53 +02:00
4fef9c3652 gitea_action: Add docs.clan.lol auto deploy 2024-05-03 20:34:27 +02:00
393ed517e2 jsonschema: Filter out 'invisible' options, that are there to throw errors on define 2024-05-03 19:40:42 +02:00
159198b81a Add jsonschema test case 2024-05-03 19:40:42 +02:00
Clan Merge Bot
83ea2312a1 update flake lock - 2024-04-29T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/0a17298c0d96190ef3be729d594ba202b9c53beb' (2024-04-05)
  → 'github:nix-community/disko/285e26465a0bae510897ca04da26ce6307c652b4' (2024-04-26)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/0c15e76bed5432d7775a22e8d22059511f59d23a' (2024-04-04)
  → 'github:nix-community/nixos-generators/722b512eb7e6915882f39fff0e4c9dd44f42b77e' (2024-04-22)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/90b1a963ff84dc532db92f678296ff2499a60a87' (2024-03-31)
  → 'github:nix-community/nixpkgs.lib/3c62b6a12571c9a7f65ab037173ee153d539905f' (2024-04-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/298edc8f1e0dfffce67f50375c9f5952e04a6d02' (2024-04-07)
  → 'github:NixOS/nixpkgs/30ddacc06345a478f9528fa29e2c8857b90381b2' (2024-04-28)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/39191e8e6265b106c9a2ba0cfd3a4dafe98a31c6' (2024-04-07)
  → 'github:Mic92/sops-nix/f1b0adc27265274e3b0c9b872a8f476a098679bd' (2024-04-23)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/49dc4a92b02b8e68798abd99184f228243b6e3ac' (2024-04-01)
  → 'github:numtide/treefmt-nix/c6aaf729f34a36c445618580a9f95a48f5e4e03f' (2024-04-25)
2024-05-03 10:31:23 +00:00
022a55639f Merge pull request 'rename everything to Clan' (#1301) from ci into main
Reviewed-on: clan/clan-core#1301
2024-05-03 09:47:55 +00:00
6f2430b191 deprecate gitea nix builds 2024-05-03 11:45:02 +02:00
6236defde6 rename everything to Clan 2024-05-03 11:45:02 +02:00
9a8a5f4c00 Merge pull request 'Throw error on missing clanModule description or if description too long. Add xfce description.' (#1306) from Qubasa-main into main 2024-05-02 16:00:32 +00:00
6908527ebd Throw error on missing clanModule description or if description too long. Add xfce description. 2024-05-02 17:53:27 +02:00
d013ef20da Merge pull request 'Require README.md for every clan module' (#1302) from Qubasa-main into main 2024-05-02 15:03:59 +00:00
570f04ecdc Fix zt-tcp-relay 2024-05-02 16:59:17 +02:00
3a9a7eedf9 Remove unreferenced clan modules 2024-05-02 16:34:25 +02:00
ee552d3020 Move vm clanModules to lib 2024-05-02 16:34:25 +02:00
b95d95554a Add description field to function-schema 2024-05-02 16:34:25 +02:00
a09e680fa0 Require README.md for every clan module 2024-05-02 16:34:25 +02:00
853d8221c0 Merge pull request 'qga: add argument 'check'' (#1303) from DavHau-dave into main 2024-05-02 13:13:12 +00:00
43c799c3d0 qga: add argument 'check' 2024-05-02 15:03:22 +02:00
f231f1e0c7 Merge pull request 'check jsonschema comaptibility for all clan modules' (#1280) from schema into main 2024-05-01 21:18:33 +00:00
a48df5b993 Add package function-schema and module-schema. Add check for module jsonschema. 2024-05-01 23:16:17 +02:00
e08342a6f3 Merge pull request 'template: remove invalid enable option for zerotier' (#1299) from hsjobeki-main into main 2024-04-30 17:41:46 +00:00
e0f56c3c6b
template: remove invalid enable option for zerotier 2024-04-30 19:37:03 +02:00
64c5a81f74 Merge pull request 'template: use disko module direcly' (#1298) from hsjobeki-main into main 2024-04-30 17:23:08 +00:00
56fad0fd4a
template: use disko module direcly 2024-04-30 19:16:13 +02:00
3dce5d2f95 Merge pull request 'add cli docs generator' (#1297) from hsjobeki-main into main 2024-04-30 17:11:37 +00:00
bfe4f2c8f4
add cli docs generator 2024-04-30 19:01:53 +02:00
1051367ca4
add cli docs generator 2024-04-30 18:53:00 +02:00
480bb396ed Merge pull request 'Fix reading secret from pipe' (#1296) from error-handling into main
Reviewed-on: clan/clan-core#1296
2024-04-30 14:54:24 +00:00
b5653c169b sops: fix setting secret from pipe 2024-04-30 14:04:49 +02:00
5606101ce8 sops: also log content type on error 2024-04-30 13:56:07 +02:00
3da4117702 Merge pull request 'clan-cli: add CLAN_DIR environment variable' (#1283) from a-kenji-feat/clan-dir into main 2024-04-30 10:08:13 +00:00
f383c6f82d clan-cli: add CLAN_DIR environment variable
Add the `CLAN_DIR` environment variable.
With this the user can specify the location of the clan.
2024-04-30 12:00:47 +02:00
af86980192 Merge pull request 'clanCore: remove repl-flake as it is now stable' (#1278) from lassulus-HEAD into main 2024-04-27 14:37:25 +00:00
c681cc0998 clanCore: remove repl-flake as it is now stable 2024-04-27 16:28:23 +02:00
0804e5e415 Merge pull request 'clan(help): standardise on machine capitalisation' (#1276) from a-kenji-clan-help/standardize into main 2024-04-26 10:14:35 +00:00
95f93d8800 clan(help): standardise on machine capitalisation 2024-04-26 12:07:09 +02:00
4602c06835 Merge pull request 'clan(help): improve install description' (#1274) from a-kenji-improve-clan-help into main 2024-04-26 09:49:50 +00:00
a3f6996d69 clan(help): improve install description 2024-04-26 11:42:18 +02:00
7f424c862b Merge pull request 'docs: improve docs' (#1273) from hsjobeki-main into main 2024-04-26 09:27:24 +00:00
94449a02d5
docs: improve docs 2024-04-26 11:20:43 +02:00
ed14f3e827 Merge pull request 'dos: improve docs' (#1272) from hsjobeki-main into main 2024-04-26 09:14:23 +00:00
152a908dc9
docs: improve docs 2024-04-26 11:07:33 +02:00
ac0cb620cf Merge pull request 'init c4 uml & refactor secrets with some diagrams' (#1255) from hsjobeki-main into main 2024-04-26 08:49:00 +00:00
6a484fef66
docs: improve secrets documentation 2024-04-26 10:44:14 +02:00
fc1bf17b9c
docs: init c4 diagrams 2024-04-24 16:35:27 +02:00
39d6edc673 Merge pull request 'vm-manager: move signals to emitter' (#1271) from hsjobeki-vm-manager/empty-splash into main 2024-04-24 12:50:34 +00:00
4a66cdffaf
vm-manager: move signals to emitter 2024-04-24 14:41:53 +02:00
216c560830 Merge pull request 'secrets: ensure all added/deleted files get committed' (#1253) from DavHau-dave into main 2024-04-24 10:42:50 +00:00
cf67de2f69 secrets: ensure all added/deleted files get committed 2024-04-24 17:26:32 +07:00
b702ca686e Merge pull request 'add: cd command' (#1265) from a-kenji-docs-patch-1 into main 2024-04-23 18:57:09 +00:00
acdb0a9b27 add: cd command 2024-04-23 20:52:41 +02:00
70ed0757a3 Merge pull request 'vm-manager: add empty list screen' (#1264) from hsjobeki-vm-manager/empty-splash into main 2024-04-23 14:22:47 +00:00
9778c432c2
vm-manager: add empty list screen 2024-04-23 16:18:10 +02:00
1da6a0c5a2
vm-manager: add empty list screen 2024-04-23 16:17:09 +02:00
5f5155023c
vm-manager: add empty list screen 2024-04-23 16:16:48 +02:00
1366d0bcf6
WIP 2024-04-23 11:16:33 +02:00
351571a655 Merge pull request 'installer: fix qr code again' (#1260) from lassulus-HEAD into main 2024-04-22 19:10:59 +00:00
3c02453705 installer: fix qr code again 2024-04-22 21:04:41 +02:00
7a74c86c70 Merge pull request 'clan-cli ssh: --json can be file or str' (#1259) from lassulus-HEAD into main 2024-04-22 18:56:19 +00:00
4ae5b24d24 installer: make qrcode compatible with nixos-images 2024-04-22 20:49:35 +02:00
05b510230f Merge pull request 'clan-cli ssh: --json can be file or str' (#1258) from lassulus-HEAD into main 2024-04-22 18:27:35 +00:00
9cb23b807c clan-cli ssh: fix qr code format 2024-04-22 20:21:44 +02:00
0a1cc29abf clan-cli ssh: --json can be file or str 2024-04-22 20:13:17 +02:00
1a87df646d Merge pull request 'facts password-store: take path from variable' (#1256) from lassulus-HEAD into main 2024-04-21 17:16:32 +00:00
4964415d34 facts password-store: take path from variable 2024-04-21 19:09:46 +02:00
9ac0839bd5 Merge pull request 'clan: clan machines install use verbose flag' (#1252) from a-kenji-clan/install into main 2024-04-19 14:45:29 +00:00
6becce81cb clan: clan machines install use verbose flag 2024-04-19 16:38:39 +02:00
8b1eae8c27 Merge pull request 'fix actual installer' (#1251) from image into main 2024-04-19 12:18:06 +00:00
5cfc9f7db4 fix actual installer 2024-04-19 14:13:02 +02:00
2c96e467fa deploy-docs: fix undefined variable 2024-04-19 13:59:39 +02:00
3db2ecece6 Merge pull request 'deploy-docs: fix undefined variable' (#1250) from image into main
Reviewed-on: clan/clan-core#1250
2024-04-19 11:59:35 +00:00
8d74983103 deploy-docs: fix undefined variable 2024-04-19 11:59:35 +00:00
81f7237a41 Merge pull request 'Change iso to nixos-images version' (#1249) from image into main 2024-04-19 11:49:51 +00:00
3ebc2e8be9 Change iso to nixos-images version 2024-04-19 13:43:40 +02:00
a810e96a20 Merge pull request 'docs: clan core ref' (#1246) from hsjobeki-main into main 2024-04-18 11:12:28 +00:00
1a99e033eb
docs: clan core ref 2024-04-18 13:05:58 +02:00
6d2ec12cca Merge pull request 'clan: clan ssh fix password login' (#1245) from a-kenji-clan-cli/fix-ssh-passowrd into main 2024-04-17 19:52:00 +00:00
e81a7415d8 clan: clan ssh fix password login 2024-04-17 21:45:14 +02:00
d2dffe30a3 Merge pull request 'docs: add clan modules readme support' (#1244) from hsjobeki-main into main 2024-04-17 16:31:17 +00:00
a2074bb82b
docs: init synthing & deltachat 2024-04-17 18:26:37 +02:00
f964304224 Merge pull request 'clan: clan ssh fix for new installer image' (#1243) from a-kenji-clan/fix-ssh into main 2024-04-17 16:25:38 +00:00
72811d0828 clan: clan ssh fix for new installer image 2024-04-17 18:20:40 +02:00
22b767466c Merge pull request 'pkgs: add metadata' (#1238) from a-kenji-pkgs/add-metadata into main 2024-04-17 11:35:19 +00:00
9f808b1bdb pkgs: add metadata
Closes #1151
2024-04-17 13:32:50 +02:00
ed9d65a91c Merge pull request 'docs: add clan modules readme support' (#1237) from hsjobeki-main into main 2024-04-17 10:58:17 +00:00
87559613ed
docs: add clan modules readme support 2024-04-17 12:52:04 +02:00
0bae84b1ae Merge pull request 'clan-cli: fix clan ssh --json and --png' (#1234) from clan/ssh into main
Reviewed-on: clan/clan-core#1234
2024-04-17 10:12:37 +00:00
498d29cca1 clan-cli: fix clan ssh --json and --png
This fixes `clan ssh` with the `--json` and `--png` flags.

It will now correctly use the actual fields that are present in the
generated json.

- probes if the ports are accessible
- if accessible will attempt a single ssh connection with the provided
password, in order to not spam ssh attempts

Fixes #1177
2024-04-17 10:12:37 +00:00
a33a76ecd2 Merge pull request 'rework multicast support' (#1236) from parallelism into main 2024-04-17 09:05:05 +00:00
8658e1694a rework multicast support 2024-04-17 10:57:17 +02:00
0dde758296 Merge pull request 'docs: split clan-core options into sub-pages' (#1235) from hsjobeki-main into main 2024-04-17 07:45:54 +00:00
5e33a0b3b8
docs: split clan-core options into sub-pages 2024-04-17 09:39:40 +02:00
c57cc5204c Merge pull request 'docs: generate api docs' (#1233) from hsjobeki-tutorials into main 2024-04-16 17:13:38 +00:00
9a3f27ea08
docs: generate api docs 2024-04-16 19:07:28 +02:00
b7f5e98db0 Merge pull request 'documentation: convert note to admonition' (#1227) from a-kenji-docs/set-target-host into main 2024-04-16 10:34:38 +00:00
1db0ace17b documentation: convert note to admonition 2024-04-16 12:28:32 +02:00
059e4efcdc Merge pull request 'docs: improve flake-parts configuration' (#1226) from hsjobeki-tutorials into main 2024-04-16 10:08:54 +00:00
581b48b518
docs: improve flake-parts configuration 2024-04-16 12:02:44 +02:00
f8b881c41e Merge pull request 'refactor facts command to regenerate facts for all machines' (#1223) from parallelism into main 2024-04-15 20:35:22 +00:00
dcad0d0d79 include machine name when generating secrets 2024-04-15 22:17:53 +02:00
a4b15d2ca2 flake-parts: fix merging of all-machines-json 2024-04-15 22:14:54 +02:00
f385e0e037 refactor facts command to regenerate facts for all machines 2024-04-15 22:14:54 +02:00
060e3baa08 Merge pull request 'documentation: improve presentation' (#1222) from a-kenji-docs/improve into main 2024-04-15 10:03:34 +00:00
2d42af3675 documentation: improve presentation 2024-04-15 11:57:23 +02:00
ca0c109b76 Merge pull request 'broken links replaced (and linking to doc pages (mkdocs rendered pages))' (#1220) from vater/clan-core:main into main
Reviewed-on: clan/clan-core#1220
2024-04-15 09:49:14 +00:00
8ffe5a562f broken links removed (and linking to doc pages (mkdocs rendered pages)) 2024-04-14 22:38:05 +00:00
997b9d5426 Merge pull request 'documentation: add contribution standards' (#1219) from a-kenji-documentation/standards into main 2024-04-14 15:00:44 +00:00
8322d5dc27 documentation: add contribution standards 2024-04-14 16:54:23 +02:00
419936d1b4 Merge pull request 'documentation: small admonition nit' (#1216) from a-kenji-documentation/nits into main 2024-04-14 13:24:29 +00:00
a81da72ec4 documentation: small admonition nit 2024-04-14 15:18:16 +02:00
4ae5840078 Merge pull request 'documentation: improve configuration' (#1215) from a-kenji-docs/configuration into main 2024-04-14 13:05:18 +00:00
5b846c7c6f documentation: improve configuration 2024-04-14 15:00:41 +02:00
03c109c7f5 Merge pull request 'documenation: improve flake-parts' (#1214) from a-kenji-documentation/improve/flake-parts into main 2024-04-14 12:27:34 +00:00
a1f5024fde documenation: improve flake-parts 2024-04-14 14:23:11 +02:00
09a5fd31a6 Merge pull request 'docs: fix contributing casing' (#1213) from a-kenji-docs/fix-contrib into main 2024-04-14 11:29:15 +00:00
933401eb62 docs: fix contributing casing 2024-04-14 13:22:51 +02:00
b1c0b90fb0 Merge pull request 'documentation: improve secrets page' (#1212) from a-kenji-docs/secrets into main 2024-04-14 11:19:49 +00:00
4442ba777a documentation: improve secrets page 2024-04-14 13:15:26 +02:00
bc7c3ad782 Merge pull request 'documentation: improve networking section' (#1211) from a-kenji-docs/improve-networking into main 2024-04-14 10:49:36 +00:00
062de6866e documentation: improve networking section 2024-04-14 12:43:09 +02:00
1140a847ad Merge pull request 'documenation: improve styling' (#1210) from a-kenji-docs/installer-style into main 2024-04-14 10:35:15 +00:00
711d5d4319 documenation: improve styling 2024-04-14 12:30:56 +02:00
f8675949b9 Merge pull request 'documentation: improve installer wording' (#1209) from a-kenji-docs/installer-wording into main 2024-04-14 10:26:43 +00:00
18a961332e documentation: improve installer wording 2024-04-14 12:20:30 +02:00
d1457c424a Merge pull request 'documentation: improve templates section' (#1208) from a-kenji-docs/update-template into main 2024-04-14 09:58:50 +00:00
d717d9e90d Merge pull request 'documentation: fix typo' (#1207) from a-kenji-fix/typ into main 2024-04-14 09:56:20 +00:00
1bec39cfc6 Merge pull request 'documentation: disable copy for outputs' (#1206) from a-kenji-docs/outputs into main 2024-04-14 09:52:01 +00:00
3d0d124b8a documentation: improve templates section 2024-04-14 11:51:43 +02:00
6cfe735c69 documentation: fix typo 2024-04-14 11:46:53 +02:00
b28d7e45d3 documentation: disable copy for outputs 2024-04-14 11:45:20 +02:00
d7feff104e Merge pull request 'docs: fix migrated build directory' (#1205) from hsjobeki-tutorials into main 2024-04-13 17:45:24 +00:00
10ad6da359
docs: fix migrated build directory 2024-04-13 19:40:28 +02:00
57791ef52a Merge pull request 'docs: decompose configuration guide' (#1204) from hsjobeki-tutorials into main 2024-04-13 15:52:29 +00:00
3a9c84cb45 docs: decompose configuration guide 2024-04-13 15:46:38 +00:00
d2b7bd593b Merge pull request 'documentation: standardize on bash doccomments' (#1203) from a-kenji-docs/standardize-bash into main 2024-04-13 14:41:20 +00:00
7f89740d1b documentation: standardize on bash doccomments 2024-04-13 16:35:16 +02:00
b8d863240c Merge pull request 'docs: improve template' (#1201) from hsjobeki-tutorials into main 2024-04-13 14:33:28 +00:00
b2a1f8571c
format 2024-04-13 16:29:24 +02:00
d021b2fb34
template: remove system 2024-04-13 16:00:01 +02:00
fa5058bce4
docs: reword 2024-04-13 15:55:15 +02:00
1978aae39f
docs: improve template 2024-04-13 15:53:45 +02:00
6212492c89 Merge pull request 'documentation: make lsblk command copyable' (#1200) from a-kenji-docs/impr into main 2024-04-13 13:21:59 +00:00
4874500b8f documentation: make lsblk command copyable 2024-04-13 15:16:05 +02:00
579994aea6 Merge pull request 'hsjobeki-tutorials' (#1199) from hsjobeki-tutorials into main 2024-04-13 12:57:33 +00:00
2207fd8961
docs: add success block 2024-04-13 14:53:18 +02:00
ff99b10616
docs: rephrase tabs 2024-04-13 14:48:26 +02:00
babf7e3d12
docs: clean up directory structure 2024-04-13 14:48:26 +02:00
7d543da8c2 Merge pull request 'documentation: fix wording' (#1198) from a-kenji-docs/wording into main 2024-04-13 12:19:10 +00:00
f464eafe6c documentation: fix wording 2024-04-13 14:12:47 +02:00
a9347f4ed9 Merge pull request 'docs: move hardware / cloud computers behind tab selection' (#1197) from hsjobeki-tutorials into main 2024-04-13 12:03:57 +00:00
8de732239d
docs: move hardware / cloud computers behind tab selection 2024-04-13 13:59:48 +02:00
e52a9f3a16 Merge pull request 'documentation: allow code content to be copied' (#1196) from a-kenji-documentation/impl/copy into main 2024-04-13 11:55:52 +00:00
579b800755 Merge pull request 'docs: remove custom css' (#1195) from hsjobeki-tutorials into main 2024-04-13 11:50:12 +00:00
92de72427e documentation: allow code content to be copied
Allow code content to be copied.

Fixes #1179
2024-04-13 13:48:25 +02:00
e74d0aa3d2 docs: remove custom css 2024-04-13 11:44:32 +00:00
1f11c67e23 Merge pull request 'documentation: improve wifi' (#1194) from a-kenji-docs/improve into main 2024-04-13 11:36:58 +00:00
077598b3ac documentation: improve wifi 2024-04-13 13:32:54 +02:00
35a5131b24 Merge pull request 'vm-manager: fix typos in error message' (#1193) from a-kenji-vm-manager/fix into main 2024-04-13 10:28:54 +00:00
1b77f746bc Merge pull request 'documentation: fix wording' (#1192) from a-kenji-docs/fix into main 2024-04-13 10:25:30 +00:00
275b61925a Merge pull request 'documentation: fix wording' (#1191) from a-kenji-docs/wording into main 2024-04-13 10:22:59 +00:00
e8e37bfb6c Merge pull request 'documentation: add missing character' (#1190) from a-kenji-docs/missing into main 2024-04-13 10:19:05 +00:00
b474de8137 vm-manager: fix typos in error message 2024-04-13 12:18:58 +02:00
57096ae0f4 Merge pull request 'documentation: add correct nix-shell invocation' (#1189) from a-kenji-docs/add-clan-cli into main 2024-04-13 10:14:45 +00:00
b5746906fb documentation: fix wording 2024-04-13 12:14:20 +02:00
ff035d34ed documentation: fix wording 2024-04-13 12:11:13 +02:00
9747d77461 Merge pull request 'docs: fix wording' (#1188) from a-kenji-docs/install into main 2024-04-13 10:10:51 +00:00
e58204a5a7 documentation: add missing character 2024-04-13 12:09:40 +02:00
985deb27a9 documentation: add correct nix-shell invocation 2024-04-13 12:08:35 +02:00
1c690c2a66 docs: fix wording 2024-04-13 12:06:29 +02:00
136b317def Merge pull request 'clan-vm-manager: fix wording in toast' (#1187) from a-kenji-clan-vm-manager/fix/toast into main 2024-04-13 10:02:03 +00:00
9f3fcaf68e clan-vm-manager: fix wording in toast 2024-04-13 11:55:58 +02:00
c4ef4b1950 Merge pull request 'docs: fix wording and typo' (#1185) from a-kenji-doc/fix/wording into main 2024-04-13 09:53:15 +00:00
42e653a647 docs: fix wording and typo 2024-04-13 11:41:00 +02:00
8d6659e60b Merge pull request 'clan-cli: fix typos' (#1183) from a-kenji-clan-cli/fix/typos into main 2024-04-12 15:47:32 +00:00
fff810ed43 clan-cli: fix typos 2024-04-12 17:40:54 +02:00
2df2787989 Merge pull request 'docs: self host documentation with mkDocs' (#1176) from hsjobeki-tutorials into main
Reviewed-on: clan/clan-core#1176
2024-04-12 15:14:43 +00:00
70cdf23875
docs: add theming 2024-04-12 17:13:11 +02:00
4d75feea65
deploy-docs: fail on error 2024-04-12 17:13:11 +02:00
c3f2c548a6
add deploy script for homepage 2024-04-12 17:13:11 +02:00
30663d563d
fix build on macos 2024-04-12 17:13:11 +02:00
43102906aa
disable module docs until migrated 2024-04-12 17:13:11 +02:00
445d547814
remove checks 2024-04-12 17:13:11 +02:00
28773725ec
docs: fix links 2024-04-12 17:13:11 +02:00
ecd48df496
worklow: disable link checking, this is done by mkDocs 2024-04-12 17:13:11 +02:00
d4f10c34c4
fix up title 2024-04-12 17:13:11 +02:00
e04e4e4fdb
make "Getting Started" the start page 2024-04-12 17:13:11 +02:00
60f2bf54c3
add instructions to live reload docs 2024-04-12 17:13:11 +02:00
1e08a454fb
docs: self host documentation with mkDocs 2024-04-12 17:13:11 +02:00
f61a78a1cf Merge pull request 'docs: fix diskLayouts' (#1182) from a-kenji-documentation/fix/docs into main 2024-04-12 14:54:54 +00:00
f76e6cfd1e docs: fix diskLayouts 2024-04-12 16:44:00 +02:00
ae8e15dc5e Merge pull request 'fix installer' (#1175) from docs into main
Reviewed-on: clan/clan-core#1175
2024-04-12 14:00:25 +00:00
26c71d9720 installer: add zstd compression 2024-04-12 14:00:25 +00:00
088e0d3eee fix installer 2024-04-12 14:00:25 +00:00
cb20f62486 Merge pull request 'docs: fix iso location' (#1174) from a-kenji-fix/docss into main 2024-04-12 13:15:29 +00:00
828d61fef5 Merge pull request 'docs: remove superfluous heading' (#1173) from a-kenji-fix/docs into main 2024-04-12 13:11:25 +00:00
75fc8fd35a docs: fix iso location 2024-04-12 15:06:01 +02:00
684cadebc3 docs: remove superfluous heading 2024-04-12 14:55:59 +02:00
6ddd70e2be Merge pull request 'fix case when secrets are regenerated during update/install' (#1172) from docs into main
Reviewed-on: clan/clan-core#1172
2024-04-12 12:51:27 +00:00
b3522b73aa fix case when secrets are regenerated during update/install 2024-04-12 14:46:51 +02:00
573a462aee Merge pull request 'Rework and fix root-password module' (#1171) from docs into main
Reviewed-on: clan/clan-core#1171
2024-04-12 12:00:43 +00:00
3f8ab35a19 rework root-password module 2024-04-12 12:00:43 +00:00
895f6fbc8a Merge pull request 'sops/compat: fix name reference' (#1170) from docs into main 2024-04-12 11:29:32 +00:00
6958da2d57 sops/compat: fix name reference 2024-04-12 13:23:52 +02:00
2e6e9b175e Merge pull request 'sops: fix secret path generation' (#1168) from docs into main 2024-04-12 11:19:56 +00:00
58446db110 sops: fix secret path generation 2024-04-12 13:12:31 +02:00
396071a925 Merge pull request 'quickstart: fix link' (#1162) from docs into main
Reviewed-on: clan/clan-core#1162
2024-04-12 10:09:28 +00:00
439714a242 quickstart: fix link 2024-04-12 10:09:28 +00:00
13e1aefb65 Merge pull request 'clan-vm-manager: Add install-desktop.sh' (#1161) from Qubasa-main into main 2024-04-12 09:54:09 +00:00
057d0defee clan-vm-manager: Add install-desktop.sh. Fix incorrect doku link 2024-04-12 11:47:18 +02:00
7dcadd3025 Merge pull request 'docs: fix unsupported languages' (#1157) from hsjobeki-tutorials into main
Reviewed-on: clan/clan-core#1157
2024-04-10 16:50:07 +00:00
d292f2de98
docs: fix unsupported languages 2024-04-10 18:40:51 +02:00
6aec3ac73d Merge pull request 'docs: improve tutorials' (#1156) from hsjobeki-tutorials into main
Reviewed-on: clan/clan-core#1156
2024-04-10 16:25:18 +00:00
e6acbadae6 docs: improve template & secrets 2024-04-10 16:25:18 +00:00
00558923a5 Merge pull request 'factstore: secret backends now can return the path to a secret dynamically' (#1143) from networkd into main
Reviewed-on: clan/clan-core#1143
2024-04-10 15:14:30 +00:00
82aafc287e also enable LLMNR 2024-04-10 15:14:30 +00:00
0d4e1f870b factstore: secret backends now can return the path to a secret dynamically
try to move path function out
2024-04-10 15:14:30 +00:00
faaf6649c5 fix multicast dns for ethernet 2024-04-10 15:14:30 +00:00
f33c3ece3d Merge pull request 'don't hard-code page weight' (#1118) from fricklerhandwerk/clan-core:doc-contributing into main 2024-04-10 13:35:50 +00:00
a5586d27f0 Merge pull request 'build iso with nixos-generators' (#1155) from lassulus-generators-iso into main 2024-04-10 13:20:00 +00:00
70282b8d77 build iso with nixos-generators 2024-04-10 15:03:55 +02:00
6d050c0c10 Merge pull request 'docs: improve tutorials' (#1154) from hsjobeki-tutorials into main 2024-04-10 13:01:21 +00:00
87eb38a2c9
docs: move install stick into sperate docs 2024-04-10 14:54:41 +02:00
388c9c94e4 Merge pull request 'tutorials' (#1149) from tutorials into main 2024-04-10 11:43:07 +00:00
960e560d84
docs: fix links 2024-04-10 13:37:54 +02:00
d951c570f0
docs: improve getting started 2024-04-10 13:33:47 +02:00
adfdc96b64
docs: improve tutorials 2024-04-10 13:33:47 +02:00
f7a29ebaf8 Merge pull request 'templates: makes template working' (#1148) from hsjobeki-main into main 2024-04-10 10:38:56 +00:00
996fdd6c9c
templates: makes template working 2024-04-10 12:28:41 +02:00
d3e42a3ad2 Merge pull request 'add root-password module' (#1147) from hsjobeki-main into main 2024-04-10 09:36:16 +00:00
292ac97067
add root-password module 2024-04-10 11:23:39 +02:00
84f527fc39 Merge pull request 'docs: improve tutorials' (#1126) from tutorials into main
Reviewed-on: clan/clan-core#1126
2024-04-10 09:14:03 +00:00
c4c843ba18 docs: improve tutorials 2024-04-10 09:14:03 +00:00
915864f637 Merge pull request 'fix quickstart instructions' (#1146) from alejandrosame/clan-core:fix/quickstart into main
Reviewed-on: clan/clan-core#1146
2024-04-10 09:13:13 +00:00
8ab9021c3d fix quickstart instructions
The guide instructs the reader to look for the PTUUID (partition ID) to fill
disk ID in the disklayout. This leads to an error as the partition gets deleted
and the UUID is no longer valid. The ID-LINK field is a unique ID provided by
the hardware manufacturer.
2024-04-09 20:57:36 +02:00
36ce43bfcf Merge pull request 'enable multicast fore default dhcp network' (#1141) from networkd into main
Reviewed-on: clan/clan-core#1141
2024-04-09 13:35:51 +00:00
a8718b92d4 enable multicast fore default dhcp network 2024-04-09 13:35:51 +00:00
5dac575be8 Merge pull request 'Set networking.hostName to clanCore.machineName' (#1140) from networkd into main 2024-04-09 13:14:44 +00:00
19a62817f2 sops: strip out clanCore.machineName instead of networking.hostName 2024-04-09 15:10:27 +02:00
1ac982fbdb set networking.hostName to clanCore.machineName 2024-04-09 15:10:08 +02:00
26146edbc5 Merge pull request 'drop custom systemd-networkd unit' (#1132) from networkd into main 2024-04-09 10:37:51 +00:00
e8ebfb2e2a drop custom systemd-networkd unit
We no longer use multicast dns. This one doesn't
conflict with nixos-generate-config.
2024-04-09 12:31:57 +02:00
3480b7d089 Merge pull request 'vms/run.py: refactor use kwargs instead of dataclass for function args' (#1125) from DavHau-dave into main 2024-04-09 07:36:02 +00:00
fc73301ed9 vms/run.py: refactor use kwargs instead of dataclass for function args 2024-04-09 14:30:46 +07:00
30db1039d1 Merge pull request 'Automatic flake update - 2024-04-08T00:00+00:00' (#1124) from flake-update-2024-04-08 into main 2024-04-08 00:13:31 +00:00
Clan Merge Bot
8429ccccb3 update flake lock - 2024-04-08T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/502241afa3de2a24865ddcbe4c122f4546e32092' (2024-03-28)
  → 'github:nix-community/disko/0a17298c0d96190ef3be729d594ba202b9c53beb' (2024-04-05)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2' (2024-03-01)
  → 'github:hercules-ci/flake-parts/9126214d0a59633752a136528f5f3b9aa8565b7d' (2024-04-01)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/63194fceafbfe583a9eb7d16ab499adc0a6c0bc2' (2024-03-28)
  → 'github:nix-community/nixos-generators/0c15e76bed5432d7775a22e8d22059511f59d23a' (2024-04-04)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/b2a1eeef8c185f6bd27432b053ff09d773244cbc' (2024-03-24)
  → 'github:nix-community/nixpkgs.lib/90b1a963ff84dc532db92f678296ff2499a60a87' (2024-03-31)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cd1c70d941d69d8d6425984ff8aefca9b28e861a' (2024-03-31)
  → 'github:NixOS/nixpkgs/298edc8f1e0dfffce67f50375c9f5952e04a6d02' (2024-04-07)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/99b1e37f9fc0960d064a7862eb7adfb92e64fa10' (2024-03-31)
  → 'github:Mic92/sops-nix/39191e8e6265b106c9a2ba0cfd3a4dafe98a31c6' (2024-04-07)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1810d51a015c1730f2fe05a255258649799df416' (2024-03-30)
  → 'github:numtide/treefmt-nix/49dc4a92b02b8e68798abd99184f228243b6e3ac' (2024-04-01)
2024-04-08 00:00:15 +00:00
d89edef9a1 Merge pull request 'improve starter template' (#1123) from Qubasa-better-template into main 2024-04-07 19:12:02 +00:00
1e0d73e8a9 Improve documentation 2024-04-07 21:07:02 +02:00
4faba7c8e1 template: Reverted systemd-boot in installer. EF02 partition on wrong second place 2024-04-07 17:09:44 +02:00
83346eeff5 template: Fixed incorrect nix code 2024-04-07 15:59:33 +02:00
55f3878e67
machine.md: clean up guide 2024-04-07 14:32:23 +02:00
49d83fd659
migrate.md: make docs more approachable 2024-04-07 12:53:15 +02:00
6a610c7a0b Improve documentation 2024-04-06 13:35:17 +02:00
033f7c67f4 Improve documentation 2024-04-06 13:34:40 +02:00
6d8d211968 Improve documentation 2024-04-06 12:34:49 +02:00
91dddc2281 Fix merge issue 2024-04-06 11:56:06 +02:00
a520116584 Improve documentation 2024-04-06 11:54:34 +02:00
0681f6bf7c docs: don't set page weight
since currently the web site simply dumps these pages, this makes it
impossible to control the item order
2024-04-05 21:52:56 +02:00
e68eba914e improve starter template 2024-04-05 18:55:14 +02:00
fa74d1c0b3 Merge pull request 'flash-fixes' (#1116) from flash-fixes into main
Reviewed-on: clan/clan-core#1116
2024-04-05 16:54:31 +00:00
1fd28f2f4c flake-parts: fixup type for specialArgs 2024-04-05 18:48:37 +02:00
818cc4d135 flash: expose mode option 2024-04-05 18:48:37 +02:00
c5e5a7edc7 grub: enable efi support by default 2024-04-05 18:47:11 +02:00
2e29c031ef Improved docs 2024-04-05 18:03:14 +02:00
f2ff815aa7 Add machines/my-machine/settings.json 2024-04-05 16:25:05 +02:00
1fc4739ee3 improve starter template 2024-04-05 13:08:32 +02:00
cb103c7772 Merge pull request 'add flake parts tutorial' (#1106) from flake-parts into main 2024-04-04 13:09:52 +00:00
7b230e2308 add flake parts tutorial 2024-04-04 15:05:08 +02:00
e78d0da30f Merge pull request 'flake-parts: fix clan-core reference' (#1105) from flake-parts into main 2024-04-04 11:42:32 +00:00
28e8af60cf flake-parts: fix clan-core reference 2024-04-04 13:38:15 +02:00
2bc027cece Merge pull request 'Add flake-parts module' (#1104) from flake-parts into main
Reviewed-on: clan/clan-core#1104
2024-04-04 11:08:08 +00:00
5ffae2070d drop unused test_backup_client machine 2024-04-04 11:24:30 +02:00
3212410704 add flake-parts module for clan 2024-04-03 16:45:06 +02:00
f7077e3540 flash: improve prompt if no disk is specified 2024-04-03 12:00:02 +02:00
1c1c143b8d docs: replace hashedPassword with initialHashedPassword 2024-04-03 12:00:02 +02:00
6e4786d08e Merge pull request 'Clan Manager: connect events with feedback system' (#1103) from hsjobeki-main into main 2024-04-03 09:41:03 +00:00
de91938760
Clan VM Manager: connect feedback with events 2024-04-03 11:36:33 +02:00
a6ba73c4a0 Merge pull request 'fix: readme typo' (#1102) from hsjobeki-main into main 2024-04-03 07:51:04 +00:00
a6f8f3fb58
fix: readme typo 2024-04-03 09:43:24 +02:00
69aa46a1d5 Merge pull request 'sops: fix decrypte path on machine' (#1091) from fact_refactor2 into main 2024-04-02 11:55:53 +00:00
8b4dbc60b5 clan/install: drop -t flag from nixos-anywhere 2024-04-02 13:50:24 +02:00
5b838c0d9c sops: fix decrypte path on machine 2024-04-02 13:50:24 +02:00
b342e3f991 Merge pull request 'syncthing: fix conflicting definition of fs.inotify.max_user_watches' (#1090) from DavHau-dave into main 2024-04-02 11:00:26 +00:00
dd0dbbd29f syncthing: fix conflicting definition of fs.inotify.max_user_watches 2024-04-02 17:56:07 +07:00
7de7e25e78 Merge pull request 'flatpak: add gitignore' (#1089) from a-kenji-gi/flatpak into main 2024-04-02 10:54:34 +00:00
97be9f1c4d flatpak: add gitignore 2024-04-02 12:48:19 +02:00
439293a079 Merge pull request 'clan-cli: add a check for the flatpak sandbox' (#1088) from a-kenji-clan-cli/check/flatpak-sandbox into main 2024-04-02 10:24:49 +00:00
9bb4c8d094 clan-cli: add a check for the flatpak sandbox
Allows for differentiation between sandbox and non sandbox usage.
2024-04-02 12:19:48 +02:00
44d897e89f Merge pull request 'modules: add ergochat' (#1078) from a-kenji-add/ergo into main 2024-04-02 09:36:55 +00:00
1a40ce0a8f modules: add ergochat 2024-04-02 11:30:22 +02:00
ff0e66512f Merge pull request 'buildClan: add clan-core to specialArgs' (#1076) from DavHau-dave into main 2024-04-02 09:15:37 +00:00
78259ad61e Merge pull request 'modules: add thelounge' (#1075) from a-kenji-init/ergochat into main 2024-04-02 09:07:18 +00:00
6f9216d3b6 buildClan: add clan-core to specialArgs 2024-04-02 16:03:45 +07:00
3bdface3db modules: add thelounge 2024-04-02 11:01:00 +02:00
388eff3baa Merge pull request 'cli/secrets: show hint in --help on how to retrieve a key' (#1074) from DavHau-dave into main 2024-04-02 07:40:54 +00:00
16ae51105e cli/secrets: show hint in --help on how to retrieve a key 2024-04-02 14:36:01 +07:00
3428b76dcb Merge pull request 'moonlight: fix facts declaration' (#1072) from DavHau-dave into main 2024-04-01 10:48:25 +00:00
1a3d5e1ad6 moonlight: fix facts declaration 2024-04-01 17:44:22 +07:00
d075b18653 Merge pull request 'Automatic flake update - 2024-04-01T00:00+00:00' (#1070) from flake-update-2024-04-01 into main 2024-04-01 00:11:28 +00:00
Clan Merge Bot
c9108d5460 update flake lock - 2024-04-01T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/5d2d3e421ade554b19b4dbb0d11a04023378a330' (2024-03-24)
  → 'github:nix-community/disko/502241afa3de2a24865ddcbe4c122f4546e32092' (2024-03-28)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/2b3720c7af2271be8cee713cd2f69c5127b0a8e4' (2024-03-25)
  → 'github:nix-community/nixos-generators/63194fceafbfe583a9eb7d16ab499adc0a6c0bc2' (2024-03-28)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/57e6b3a9e4ebec5aa121188301f04a6b8c354c9b' (2024-03-25)
  → 'github:NixOS/nixpkgs/cd1c70d941d69d8d6425984ff8aefca9b28e861a' (2024-03-31)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/405987a66cce9a4a82f321f11b205982a7127c88' (2024-03-24)
  → 'github:Mic92/sops-nix/99b1e37f9fc0960d064a7862eb7adfb92e64fa10' (2024-03-31)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/7ee5aaac63c30d3c97a8c56efe89f3b2aa9ae564' (2024-03-18)
  → 'github:numtide/treefmt-nix/1810d51a015c1730f2fe05a255258649799df416' (2024-03-30)
2024-04-01 00:00:15 +00:00
eeb703985e Merge pull request 'docs: render zola pages in clan-core flake' (#1069) from DavHau-dave into main 2024-03-31 05:37:36 +00:00
492256ec54 docs: render zola pages in clan-core flake
This integrates the generated options docs part of our website into the clan-core project. This is better than having it in a separate repos because we want to lear about breakages as early as possible.

Changes which break the documentation should be blocked by this early on
2024-03-31 12:33:31 +07:00
62f201696d Merge pull request 'docs: render module options docs' (#1068) from DavHau-dave into main 2024-03-30 17:31:34 +00:00
e0bdf1ce39 docs: render module options docs
fix errors while rendering some modules
2024-03-31 00:26:08 +07:00
ec105d8ef8 Merge pull request 'secrets: improve description of generator script' (#1067) from DavHau-dave into main 2024-03-30 10:22:40 +00:00
72cc85cd2f secrets: improve description of generator script 2024-03-30 17:16:26 +07:00
0f73a6e1cf Merge pull request 'migrate secrets to new api' (#1064) from fact_refactor2 into main 2024-03-28 10:17:24 +00:00
65d116ec28 migrate secrets to new api 2024-03-28 11:02:14 +01:00
b10c4f5846 Merge pull request 'refactor clanCore.secrets -> clanCore.facts' (#1040) from facts_refactor2 into main 2024-03-27 15:20:21 +00:00
a8d35d37e7 refactor clanCore.secrets -> clanCore.facts 2024-03-27 16:03:16 +01:00
8950c8d3bd Merge pull request 'clan-cli: Fix tmpdir leak and fix tests/temporary_dir inconsistencies' (#1063) from Qubasa-fix_tmpdir_leak2 into main 2024-03-27 14:58:20 +00:00
e6ad0cfbc1 clan-cli: Fix tmpdir leak and fix tests/temporary_dir inconsistencies 2024-03-27 15:51:52 +01:00
0676bf7283 Merge pull request 'checks: add check for rendering docs' (#1058) from DavHau-dave into main 2024-03-27 10:03:38 +00:00
3771be2110 checks: add check for rendering docs 2024-03-27 16:59:42 +07:00
d59673e89a Merge pull request 'Improved README' (#1057) from Qubasa-improv_readme3 into main 2024-03-26 18:29:50 +00:00
946f026c23 Improved README 2024-03-26 19:20:00 +01:00
8715c3ef88 Merge pull request 'rewrite backups documentation' (#1055) from Mic92-main into main 2024-03-26 16:29:32 +00:00
0c21fcf2eb rewrite backups documentation 2024-03-26 17:21:06 +01:00
9a82f8cc8b Merge pull request 'localbackup: also create mountpoints' (#1053) from Mic92-main into main 2024-03-26 14:59:11 +00:00
e27e6e6102 localbackup: also create mountpoints 2024-03-26 15:53:13 +01:00
4ff262fd60 Merge pull request 'localbackup: rename mountHook/umountHook to preMountHook/postUnmountHook' (#1050) from Mic92-main into main 2024-03-26 14:02:40 +00:00
74b5f6c61a localbackup: rename mountHook/umountHook to preMountHook/postUnmountHook 2024-03-26 14:58:37 +01:00
553b8b8476 Merge pull request 'cli/ssh: allocate tty by default' (#1043) from Mic92-main into main 2024-03-26 12:18:27 +00:00
80abeef994 Revert "ssh: add interactive flag"
This reverts commit c5db14dea8.
2024-03-26 13:13:35 +01:00
7b8a49bf6c ssh: default tty to False
nix behaves weird when the terminal is interactive because
we are also do line buffering.
2024-03-26 13:05:11 +01:00
54f0526c5b update nixos-generators 2024-03-26 12:52:00 +01:00
10a12eb85c ruff: switch to check subcommand 2024-03-26 12:52:00 +01:00
c5db14dea8 ssh: add interactive flag 2024-03-26 12:51:46 +01:00
0e2cb172e6 cli/ssh: allocate tty by default
-t is only enabled when the local ssh command is also connected to a tty,
so it seems to be enabled by default.
2024-03-26 12:07:15 +01:00
a21f731536 Merge pull request 'localbackup: add missing config arg to submodule' (#1042) from Mic92-main into main 2024-03-26 10:47:35 +00:00
bd989085ac localbackup: add missing config arg to submodule 2024-03-26 11:41:03 +01:00
dca1eee3a3 Merge pull request 'documentation: fix grammer' (#1041) from a-kenji-fix/grammar into main 2024-03-25 15:10:10 +00:00
92b1f86b7e documentation: fix grammer 2024-03-25 16:03:18 +01:00
6055dbe123 Merge pull request 'documentation fixes for facts generate command' (#1038) from facts-generate into main 2024-03-25 14:38:30 +00:00
68ac6321ee docs/backup: update command needed to regenerate backups 2024-03-25 15:33:57 +01:00
270f906412 fix casing in facts generate logs 2024-03-25 15:33:57 +01:00
ffa1d9ca6c Merge pull request 'waypipe: fix the waypipe module' (#1037) from a-kenji-modules/waypipe/fix into main 2024-03-25 14:27:14 +00:00
187bebae47 waypipe: fix the waypipe module 2024-03-25 15:21:16 +01:00
a6f1fede97 Merge pull request 'localbackup: add regression test' (#1035) from localbackup into main 2024-03-25 13:00:14 +00:00
e3c608c16d Merge pull request 'switch back to upstream waypipe' (#1025) from waypipe into main
Reviewed-on: clan/clan-core#1025
2024-03-25 12:54:16 +00:00
fee37dc1db bump nixpkgs 2024-03-25 13:36:30 +01:00
a886fd9b2d switch back to upstream waypipe 2024-03-25 13:34:02 +01:00
d291b1db63 localbackup: integrate into regression test 2024-03-25 13:26:42 +01:00
45212e2ba5 localbackup: add mounthooks 2024-03-25 13:26:42 +01:00
916e37eb26 localbackup: add pre/post exec hooks 2024-03-25 12:42:59 +01:00
58ae9d9cd0 localbackup: default to empty target list 2024-03-25 12:42:59 +01:00
62bef16092 Merge pull request 'Re-encrypt secrets after rotating users/machines keys' (#1034) from yubikey-support into main 2024-03-25 11:40:32 +00:00
0fa36252c2 re-encrypt secrets after rotating users/machines keys 2024-03-25 12:34:29 +01:00
b6d5f8a6ce docs/backup: extend documentation 2024-03-25 11:07:09 +01:00
cd9db02db0 add hint to use --force when a key already exists 2024-03-25 11:06:20 +01:00
bc75c637ef Merge pull request 'clanCore/packages.nix: add gitMinimal' (#1031) from DavHau-dave into main 2024-03-25 04:54:00 +00:00
4b8b1107ba clanCore/packages.nix: add gitMinimal
WIthout this, deployment via `clan machines update` will fail on the remote machine if the flake.nix has a git input
2024-03-25 11:47:32 +07:00
644c85866e Merge pull request 'Automatic flake update - 2024-03-25T00:00+00:00' (#1030) from flake-update-2024-03-25 into main 2024-03-25 00:22:15 +00:00
Clan Merge Bot
7cdb18331d update flake lock - 2024-03-25T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/21d89b333ca300bef82c928c856d48b94a9f997c' (2024-03-14)
  → 'github:nix-community/disko/5d2d3e421ade554b19b4dbb0d11a04023378a330' (2024-03-24)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/efd4e38532b5abfaa5c9fc95c5a913157dc20ccb' (2024-03-14)
  → 'github:nix-community/nixos-generators/417a857dfb824e60930881a254dd67d6796f5884' (2024-03-22)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/630ebdc047ca96d8126e16bb664c7730dc52f6e6' (2024-03-10)
  → 'github:nix-community/nixpkgs.lib/fa827dda806c5aa98f454da4c567991ab8ce422c' (2024-03-17)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f471be9644f3ab2f3cb868de1787ab70a537b0e7' (2024-03-17)
  → 'github:NixOS/nixpkgs/3d41d1087707826b3a90685ab69147f8dc8145d5' (2024-03-24)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616' (2024-03-17)
  → 'github:Mic92/sops-nix/405987a66cce9a4a82f321f11b205982a7127c88' (2024-03-24)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/35791f76524086ab4b785a33e4abbedfda64bd22' (2024-03-12)
  → 'github:numtide/treefmt-nix/7ee5aaac63c30d3c97a8c56efe89f3b2aa9ae564' (2024-03-18)
2024-03-25 00:00:15 +00:00
b07490ca60 Merge pull request 'select-shell: Fix breakage with previous shell.nix change' (#1029) from Qubasa-main into main 2024-03-24 23:37:57 +00:00
e26d1052b6 select-shell: Fix breakage with previous shell.nix change 2024-03-25 00:32:03 +01:00
f7866d264d Merge pull request 'clan-vm-manager: devshell doesn't require clan-cli derivation' (#1028) from Qubasa-main into main 2024-03-24 22:57:52 +00:00
9dbc71e446 clan-vm-manager: devshell doesn't require clan-cli derivation 2024-03-24 23:52:30 +01:00
5fd4a63e17 Merge pull request 'clan-vm-manager: Basic pytest framework established' (#1026) from Qubasa-main into main 2024-03-24 22:41:07 +00:00
8ab9d20342 clan-vm-manager: Working pytest skeleton. clan-cli: Fixing devshell depending on itself 2024-03-24 23:36:00 +01:00
a185ad0c59 Merge pull request 'refactor secrets & facts into secret_facts & public_facts' (#1027) from facts_refactor into main 2024-03-24 10:10:45 +00:00
f16667e25a refactor secrets & facts -> secret_facts & public_facts 2024-03-23 05:46:54 +01:00
0ee8dceee2 clan-vm-manager: Basic pytest framework established 2024-03-22 19:08:35 +01:00
ddc28f53df Merge pull request 'backup docs' (#949) from docs into main
Reviewed-on: clan/clan-core#949
2024-03-22 14:56:22 +00:00
0b6e03b3d5 backup docs 2024-03-22 14:56:22 +00:00
1d6cc49da5 Merge pull request 'clanModules: init matrix-synapse' (#1017) from matrix-synapse into main 2024-03-22 11:39:50 +00:00
786a4586a6 checks/matrix-synapse: init 2024-03-22 12:26:37 +01:00
ba772c201d clanModules: init matrix-synapse 2024-03-22 12:26:37 +01:00
ae50796e1d Merge pull request 'sunshine: improve launching of pairing' (#1021) from a-kenji-sunshine/improve-accept into main 2024-03-20 09:00:58 +00:00
f0b00b7360 sunshine: improve launching of pairing 2024-03-20 09:55:25 +01:00
1b8ae090b8 Merge pull request 'localbackup' (#1020) from localbackup into main 2024-03-20 08:49:07 +00:00
350593ccde backups: add test for pre and post restore command 2024-03-20 09:32:01 +01:00
82507a975a backups: fix name extraction for borgbackup restore 2024-03-20 09:32:01 +01:00
539df08706 backups: skip preRestore and postRestore if not specified by a service 2024-03-20 09:32:01 +01:00
aa659bcc17 backups: no longer interpret backup interface as bash commands 2024-03-20 09:32:01 +01:00
92ac151292 rework backup interface to no longer need to list backups to restore them 2024-03-20 09:32:01 +01:00
f5d32d0b22 add localbackup provider 2024-03-20 09:32:01 +01:00
691d2ca3e9 Merge pull request 'make backup provider more generic' (#1019) from backup into main
Reviewed-on: clan/clan-core#1019
2024-03-20 08:29:05 +00:00
2560eef424 backups: don't export all local environment over ssh 2024-03-20 08:29:05 +00:00
5f9d3b514b fix case when we have multiple backup destinations 2024-03-20 08:29:05 +00:00
9383e41d68 make backup provider more generic 2024-03-20 08:29:05 +00:00
7c4c6c07af Merge pull request 'refactor backup test to be just a single machine' (#1016) from Mic92-openssh into main 2024-03-19 13:38:10 +00:00
65b6ae8bb7 refactor backup test to be just a single machine 2024-03-19 14:32:11 +01:00
f8a8a92e39 Merge pull request 'moonlight: drop libnotify' (#1012) from a-kenji-moonlight/libnotify into main 2024-03-19 12:21:29 +00:00
f98d39cdeb moonlight: drop libnotify 2024-03-19 13:14:04 +01:00
7c378fced6 Merge pull request 'sunshine: drop unused files' (#1003) from a-kenji-drop/sunshine into main 2024-03-19 11:59:41 +00:00
626a9af638 sunshine: drop unused files 2024-03-19 12:53:28 +01:00
ceb1c95817 Merge pull request 'init: sunshine-moonlight-accept module' (#1002) from a-kenji-init/sunshine-accept into main 2024-03-19 11:50:15 +00:00
83efb33eb7 fmt 2024-03-19 12:40:58 +01:00
0695e2c0fc Merge branch 'main' into init/sunshine-accept 2024-03-19 12:33:45 +01:00
91ed6549a7 fmt: module 2024-03-19 12:30:40 +01:00
32d0f1ccd4 init: sunshine-moonlight-accept module 2024-03-19 12:11:09 +01:00
9f81f75f8c Merge pull request 'devshell: remove dependency on clan-cli derivation' (#1000) from DavHau-dave into main 2024-03-19 06:05:15 +00:00
580010581c devshell: remove dependency on clan-cli derivation
The devShell depended on clan-cli due to it being included as a dependency in the treefmt config. This is not optimal because this makes the devshell rebuild unnecessary often and also lead to build failures of the dev-shell if the clan-cli code is in a broken state (git rebasing, or during development etc.)
2024-03-19 13:00:59 +07:00
b2b94b269a Merge pull request 'Automatic flake update - 2024-03-18T00:00+00:00' (#998) from flake-update-2024-03-18 into main 2024-03-18 00:11:00 +00:00
Clan Merge Bot
9300ecbfe2 update flake lock - 2024-03-18T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/fe064a639319ed61cdf12b8f6eded9523abcc498' (2024-03-11)
  → 'github:nix-community/disko/21d89b333ca300bef82c928c856d48b94a9f997c' (2024-03-14)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/1d9c8cd24eba7942955f92fdcefba5a6a7543bc6' (2024-03-11)
  → 'github:nix-community/nixos-generators/efd4e38532b5abfaa5c9fc95c5a913157dc20ccb' (2024-03-14)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/7873d84a89ae6e4841528ff7f5697ddcb5bdfe6c' (2024-03-03)
  → 'github:nix-community/nixpkgs.lib/630ebdc047ca96d8126e16bb664c7730dc52f6e6' (2024-03-10)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/e4e2121b151e492fd15d4bdb034e793738fdc120' (2024-03-12)
  → 'github:NixOS/nixpkgs/f471be9644f3ab2f3cb868de1787ab70a537b0e7' (2024-03-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/e52d8117b330f690382f1d16d81ae43daeb4b880' (2024-03-11)
  → 'github:Mic92/sops-nix/83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616' (2024-03-17)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/720322c5352d7b7bd2cb3601a9176b0e91d1de7d' (2024-03-10)
  → 'github:numtide/treefmt-nix/35791f76524086ab4b785a33e4abbedfda64bd22' (2024-03-12)
2024-03-18 00:00:14 +00:00
4a5b9cf0f4 Merge pull request 'nixos-install: also respect port' (#997) from Mic92-openssh into main 2024-03-17 21:23:24 +00:00
5ff36a2cd8 nixos-install: also respect port 2024-03-17 22:18:22 +01:00
d50eeb8f89 Merge pull request 'drop secret store logging from install command' (#996) from Mic92-openssh into main 2024-03-17 20:41:39 +00:00
9f25f47298 allow to debug nixos-anywhere 2024-03-17 21:36:22 +01:00
dd0ad2683b drop secret store logging from install command 2024-03-17 21:32:23 +01:00
3555001c0d Merge pull request 'change from nixpkgs-fmt to rfc style formatter' (#995) from openssh into main
Reviewed-on: clan/clan-core#995
2024-03-17 18:53:59 +00:00
e296a3019d re-format with nixfmt 2024-03-17 19:48:49 +01:00
916e4dff84 change from nixpkgs-fmt to rfc style formatter 2024-03-17 19:44:57 +01:00
50aa98c53a Merge pull request 'make installer nixos module stand-alone' (#994) from openssh into main 2024-03-17 18:42:55 +00:00
77c0e6b31a make installer nixos module stand-alone 2024-03-17 19:38:50 +01:00
915ce52355 Merge pull request 'installer: also match qemu and serial consoles for prompting qrcode' (#993) from openssh into main 2024-03-17 18:23:07 +00:00
2dcdcd98e9 installer: also match qemu and serial consoles for prompting qrcode 2024-03-17 19:14:24 +01:00
ee9be35dcb Merge pull request 'add nix to devShell' (#992) from openssh into main 2024-03-17 17:36:00 +00:00
d7939e3cba add nix to devShell
It's important for some tests that package manager used inside NixOS vms is the same as outside
2024-03-17 18:31:16 +01:00
c727d87213 Merge pull request 'sshd: module fix impurity' (#987) from openssh into main 2024-03-17 17:20:10 +00:00
c15043c4f1 fix evaluation of backup module 2024-03-17 18:16:08 +01:00
a6c3e15aca don't use impure builtins.storePath 2024-03-17 18:10:23 +01:00
377302ff6c change facts path to be reachable as a store path 2024-03-17 18:10:23 +01:00
91a51e837e Merge pull request 'clan-vm-manager: init log view with current state of log' (#990) from hsjobeki-main into main 2024-03-17 14:03:49 +00:00
e4f4680206
clan-vm-manager: init log view with current state of log 2024-03-17 14:57:32 +01:00
9a2549ddb8 Merge pull request 'clan-vm-manager: connect log view to build state of machines' (#989) from hsjobeki-main into main 2024-03-17 13:14:49 +00:00
b44cbf5c76
clan-vm-manager: connect log view to build state of machines 2024-03-17 14:08:39 +01:00
b322b3071b Merge pull request 'dev-shell: make python shell load fast' (#985) from DavHau-dave into main 2024-03-14 10:23:53 +00:00
f4b8133037 dev-shell: make python shell load fast
- Add caching for editable installs
- Remove sleep statement in GUI code
2024-03-14 17:19:08 +07:00
7537af3943 merge-after-ci: fix bug 2024-03-14 12:46:17 +07:00
3476945fff Merge pull request 'openssh fixes' (#983) from openssh into main 2024-03-13 14:04:25 +00:00
a6d52a669d fix openssh secrets
change facts path to be the full path

sshd: fixup store path
2024-03-13 14:59:46 +01:00
08e8027347 Merge pull request 'fix openssh secrets' (#982) from openssh into main
Reviewed-on: clan/clan-core#982
2024-03-13 13:27:10 +00:00
59cb2b2a29 fix openssh secrets 2024-03-13 13:27:10 +00:00
e67ac52a33 Merge pull request 'merge-after-ci: set labels correctly' (#981) from DavHau-dave into main 2024-03-13 12:20:20 +00:00
a9dbd92ff3 merge-after-ci: set labels correctly 2024-03-13 19:11:12 +07:00
be1bd8f252 Merge pull request 'secrets-improvements' (#948) from secrets-improvements into main 2024-03-13 10:23:27 +00:00
a9fc8de2d0 allow multi-line interactive secrets 2024-03-13 11:18:56 +01:00
c2e43a4e65 allow fact-only secrets 2024-03-13 11:08:36 +01:00
8ab6fcd4c0 add sshd module 2024-03-13 11:08:36 +01:00
5b02dda003 Merge pull request 'sunshine: add path' (#947) from a-kenji-sunshine/add-path into main 2024-03-12 22:06:37 +00:00
bcf26682c3 sunshine: add path 2024-03-12 23:01:02 +01:00
2dd7304b57 Merge pull request 'sunshine: add apps, improve uaccess rules' (#946) from a-kenji-imp/sunshine into main 2024-03-12 21:23:06 +00:00
71cd46b0e9 sunshine: add apps, improve uaccess rules 2024-03-12 22:17:08 +01:00
a23a64d0f9 Merge pull request 'sunshine: improve module' (#945) from a-kenji-imp/sunshine into main 2024-03-12 19:59:09 +00:00
8a3250b1c9 sunshine: improve module 2024-03-12 20:53:04 +01:00
d01ea573f9 Merge pull request 'vm: improve xfce and vm-user module' (#944) from a-kenji-fix/vm into main 2024-03-12 18:59:19 +00:00
df1729a841 vm: improve xfce and vm-user module 2024-03-12 19:53:11 +01:00
64ec958014 Merge pull request 'clan-modules: add xfce-vm module' (#943) from a-kenji-init/vm-module into main 2024-03-12 18:42:19 +00:00
9b51dc7b4d Merge pull request 'fix: typo' (#942) from a-kenji-fix/devshell into main 2024-03-12 18:37:21 +00:00
c15d762dc7 clan-modules: add xfce-vm module
A specific module for vm's that don't (yet) support the waypipe module.
2024-03-12 19:36:11 +01:00
4044e42e58 fix: typo 2024-03-12 17:37:19 +01:00
29012304c0 Merge pull request 'clan-modules: add vm-user module' (#932) from a-kenji-add/vm-user into main 2024-03-12 16:36:24 +00:00
c8ba2e9721 Merge pull request 'reduce eval worker' (#941) from ci into main
Reviewed-on: clan/clan-core#941
2024-03-12 16:34:24 +00:00
c4642ad041 reduce eval worker 2024-03-12 17:34:07 +01:00
e654b7fe95 Merge branch 'main' into a-kenji-add/vm-user 2024-03-12 16:32:03 +00:00
7bcbe67f4d Merge pull request 'clan_vm_manager: Fix mypy errors for clan_cli types' (#938) from Qubasa-main into main 2024-03-12 16:31:48 +00:00
4e5d051847 clan_vm_manager: Fix mypy errors for clan_cli types 2024-03-12 23:27:20 +07:00
7c2e22de72 Merge pull request 'Revert "workaround gitea bug"' (#940) from ci into main
Reviewed-on: clan/clan-core#940
2024-03-12 16:26:50 +00:00
0c688a0919 Revert "workaround gitea bug"
This reverts commit 38190adfb1.
2024-03-12 17:23:12 +01:00
b5433beef9 clan-modules: add vm-user module 2024-03-12 17:20:02 +01:00
422b3f096e Merge pull request 'ci' (#935) from ci into main
Reviewed-on: clan/clan-core#935
2024-03-12 16:10:54 +00:00
38190adfb1 workaround gitea bug 2024-03-12 16:10:54 +00:00
934cf6e57a mypy: fix clan-cli import in vm-manager 2024-03-12 16:10:54 +00:00
4ef513de58 Merge pull request 'enable: spice-vdagent if xserver is enable' (#931) from a-kenji-add/spice-vm-profile into main
Reviewed-on: clan/clan-core#931
2024-03-12 16:00:54 +00:00
5d5f504013 enable: spice-vdagent if xserver is enable 2024-03-12 16:00:54 +00:00
acf1dace5c Merge pull request 'clan.borgbackup: drop enable option' (#918) from Mic92-main into main
Reviewed-on: clan/clan-core#918
2024-03-12 15:50:33 +00:00
823b5e67ed fix backup not beeing activated 2024-03-12 13:17:04 +01:00
349d3b379c update flake 2024-03-12 13:06:12 +01:00
b1897530c8 clan.borgbackup: drop enable option 2024-03-12 11:21:10 +01:00
6d76a724c0 Merge pull request 'clan-vm-manager: add log view' (#927) from hsjobeki-main into main 2024-03-10 13:14:54 +00:00
4687c816ab
clan-vm-manager: add log view 2024-03-10 14:10:59 +01:00
ee8fa1da0a
vm-manager: add toast overlay to main window 2024-03-10 10:40:00 +01:00
bfa6ff6085 Merge pull request 'clan-cli: Add py.typed to make mypy work when used as library in clan-vm-manager' (#923) from Qubasa-main into main 2024-03-10 09:10:21 +00:00
129a1516f6 clan-cli: Readd mypy ignore clan_cli because of treefmt complaining 2024-03-10 16:06:03 +07:00
167f7f4eb3 clan-cli: Add py.typed to make mypy work when used as library in clan-vm-manager 2024-03-10 15:18:18 +07:00
d9f5e050d8 Merge pull request 'clan-vm-manager: Add library for mypy pygobject types' (#921) from Qubasa-main into main 2024-03-09 16:55:54 +00:00
14900a702b clan-vm-manager: Readd ignore for clan_cli because nix fmt fails in CI. But why \? 2024-03-09 23:51:59 +07:00
5c8343d943 clan-vm-manager: Remove mypy ignore clan_cli types 2024-03-09 23:17:00 +07:00
01351ff5a1 clan-vm-manager: Add library for mypy pygobject types 2024-03-09 23:15:32 +07:00
b985215cd6 Merge pull request 'docs: improve readme for better onboarding' (#920) from hsjobeki-main into main 2024-03-09 10:28:52 +00:00
59de33b68a
docs: improve start command 2024-03-09 11:25:11 +01:00
11cfc49d27
docs: improve readme for better onboarding 2024-03-09 10:58:12 +01:00
79e4cb344f Merge pull request 'clan-vm-manager: Fix ClanUrl not pickable' (#919) from Qubasa-main into main 2024-03-08 16:51:45 +00:00
372e212c0c clan_cli: Renamed ClanUrl to FlakeId 2024-03-08 23:47:27 +07:00
f4f3176374 clan-vm-manager: Fix ClanUrl not pickable 2024-03-08 23:23:18 +07:00
1e7f63fb05 Merge pull request 'clan_vm_manager: Starting rewrite of Machine class' (#917) from Qubasa-main into main 2024-03-08 15:06:19 +00:00
e4896814f2 clan_cli: Add TimeTable class to cmd.py. Fix bugs in Machine rewrite 2024-03-08 22:01:54 +07:00
068f89e453 clan_vm_manager: Rewrite of Machine Class Part 1 2024-03-08 15:32:12 +07:00
2532c780ab Merge pull request 'add flash command and tests' (#916) from Mic92-main into main 2024-03-07 16:29:11 +00:00
4dfe4ecfa6 fix building installer iso 2024-03-07 17:24:57 +01:00
3cc97ebc56 fix container tests 2024-03-07 14:13:11 +01:00
26dd962799 treefmt 2024-03-07 14:13:11 +01:00
93afd06bcb fix install test 2024-03-07 14:13:11 +01:00
f599243cbd add flash command 2024-03-07 14:13:11 +01:00
dd73406a92 installer: switch to systemd-boot
grub is not able to boot from the disks that we flash for weird reasons.
Since BIOS-boot is on life-support, we may as well just use systemd-boot.
2024-03-07 14:13:11 +01:00
ab2defa9e4 add confirmation prompt when installing 2024-03-07 14:13:11 +01:00
1cc5dc98d3 Merge pull request 'clan_cli: Rewrite ClanURI' (#915) from Qubasa-main into main 2024-03-07 12:12:28 +00:00
a17eb3e8a3 clan_vm_manager: Fix broken vm start 2024-03-07 19:09:01 +07:00
718c0a06e2 Merge pull request 'clan_cli: Rewrite ClanURI' (#914) from Qubasa-main into main 2024-03-07 12:08:16 +00:00
442e5b45ba clan_cli: Simplify ClanURI 2024-03-07 19:04:48 +07:00
93c868a3b7 clan_cli: Rewrite ClanURI 2024-03-07 16:41:37 +07:00
9f632e90c5 Merge pull request 'fix: typos' (#913) from a-kenji-fix/typos into main 2024-03-06 12:15:23 +00:00
94caea382f fix: typos 2024-03-06 13:11:49 +01:00
8d72a36298 Merge pull request 'clan_cli,clan_vm_manager: Moved profiler to clan_cli. Add cmd timer to see how long run commands take' (#912) from Qubasa-main into main 2024-03-06 10:15:37 +00:00
a6f652bdfc clan_cli,clan_vm_manager: Moved profiler to clan_cli. Add cmd timer to see how long run commands take 2024-03-06 17:12:20 +07:00
dcf7f2f733 Merge pull request 'clan_vm_manager: Fix switch desync when pressed too fast. Secrets folder shared between build and run. clan_cli: run_vm now can have custom tmpdir location' (#910) from Qubasa-main into main 2024-03-06 09:35:38 +00:00
0e8622c491 clan_vm_manager: Fix switch desync when pressed too fast. Secrets folder shared between build and run. clan_cli: run_vm now can have custom tmpdir location 2024-03-06 16:32:19 +07:00
ff8d08e4e4 Merge pull request 'drop meshnamed from repository' (#909) from Mic92-main into main 2024-03-06 09:05:41 +00:00
0481746198 drop meshnamed from repository
It's not super useful and we can always add it back later if we need it.
2024-03-06 10:02:21 +01:00
cb564059e2 bump disko 2024-03-06 09:51:02 +01:00
cee9beb8a9 Merge pull request 'clan-cli sops: accept bytes' (#891) from sops_bytes into main 2024-03-06 08:45:44 +00:00
c4c4cd3ba8 Merge pull request 'clan-vm-manager: Add register_on_change to GKVStore. Improve overall signal typing.' (#908) from Qubasa-main into main 2024-03-06 08:07:53 +00:00
fb21a7378d clan-vm-manager: Add register_on_change to GKVStore. Improve overall signal typing. 2024-03-06 15:05:10 +07:00
b9ae911246 Merge pull request 'clan_vm_manager: Fix incorrect detection of vm already in list' (#907) from Qubasa-main into main 2024-03-05 17:35:09 +00:00
6f590ce389 clan_vm_manager: Fix switch <-> vm status desync 2024-03-06 00:32:22 +07:00
cd5afa1329 clan_vm_manager: Fix join list not rerendering correctly when updating clan_store 2024-03-06 00:18:42 +07:00
0840fffe26 clan_vm_manager: Fix incorrect detection of vm already in list 2024-03-06 00:18:42 +07:00
1986ecc564 Merge pull request 'clan_vm_manager: Fix vms not shutting down after closing GTK app. Sync JoinList with ClanStore' (#906) from Qubasa-main into main 2024-03-05 16:13:26 +00:00
580c63e760 clan_vm_manager: Fix vms not shutting down after closing GTK app. Sync JoinList with ClanStore 2024-03-05 23:10:30 +07:00
06bc425797 Merge pull request 'secrets: fix typo' (#905) from a-kenji-fix-typo into main 2024-03-05 11:02:59 +00:00
603893872e secrets: fix typo 2024-03-05 11:59:55 +01:00
e6b494a849 Merge pull request 'clan_vm_manager: Add CUMTIME to profiler output' (#904) from Qubasa-main into main 2024-03-04 09:02:49 +00:00
cde72f3710 clan_vm_manager: Add CUMTIME to profiler output 2024-03-04 16:00:04 +07:00
5047b6686d Merge pull request 'clan_vm_manager: Cache profiler obj for multi call functions' (#903) from Qubasa-main into main 2024-03-04 08:55:47 +00:00
b77ffac4d4 clan_vm_manager: Cache profiler obj for multi call functions 2024-03-04 15:52:57 +07:00
b2d3ff4431 Merge pull request 'clan_vm_manager: Extracted VMObject to own component' (#901) from Qubasa-main into main 2024-03-04 07:14:16 +00:00
f70879aa63 clan_vm_manager: Add profiler component 2024-03-04 14:01:30 +07:00
31190ed8e5 clan_vm_manager: Extracted VMObject to own component 2024-03-04 12:38:20 +07:00
36dbb8fafd Merge pull request 'clan_vm_manager: Renamed Views to ViewStack' (#899) from Qubasa-main into main 2024-03-03 09:54:26 +00:00
47ae5981f6 clan_vm_manager: Renamed Views to ViewStack 2024-03-03 16:51:34 +07:00
11c3b6f353 Merge pull request 'clan_vm_manager: Renamed VMs singleton to ClanStore. And VM to VMObject' (#898) from Qubasa-main into main 2024-03-03 09:50:32 +00:00
191562a84e clan_vm_manager: Renamed VMs singleton to ClanStore. And VM to VMObject 2024-03-03 16:47:38 +07:00
06a54c21c3 Merge pull request 'clan_vm_manager: New directory structure' (#897) from Qubasa-main into main 2024-03-03 09:41:16 +00:00
359ad22c90 clan_vm_manager: New directory structure 2024-03-03 16:38:25 +07:00
754e0ca9e8 Merge pull request 'clan_vm_manager: Added suffix task to glib task functions' (#894) from Qubasa-main into main 2024-03-03 09:18:42 +00:00
8290660f20 clan_vm_manager: Improved readability of GKVStore 2024-03-03 16:15:50 +07:00
78a50c5d74 clan_vm_manager: Added suffix task to glib task functions 2024-03-03 16:01:08 +07:00
496555b405 Merge pull request 'clan-vm-manager: Fix incorrect use of all Glib.idle_add uses' (#893) from Qubasa-main into main 2024-03-03 08:55:43 +00:00
216e5a53d4 clan_vm_manager: Remove superfluous argument to build_vm 2024-03-03 15:52:56 +07:00
a1af14db57 Merge pull request 'clan-vm-manager: Fix incorrect use of all Glib.idle_add uses' (#892) from Qubasa-main into main 2024-03-03 08:49:07 +00:00
976b4a2c3a clan_vm_manager: Fix incorrect signal behaviour in GKVStore setitem 2024-03-03 15:47:00 +07:00
c6a2db15a7 clan_vm_manager: Fix dynamic join 2024-03-03 15:47:00 +07:00
6f80cee971 clan_cli: history_add now returns newly added HistoryEntry. clan-vm-manager: Join now uses signals instead of callbacks. 2024-03-03 15:47:00 +07:00
f17cf41093 clan-vm-manager: Fix incorrect use of all Glib.idle_add uses 2024-03-03 15:47:00 +07:00
483e2c05ea clan_vm_manager: Fix incorrect signal behaviour in GKVStore setitem 2024-03-03 15:44:16 +07:00
11bf0b8b9e clan-cli sops: accept bytes 2024-03-03 09:25:40 +01:00
da34bd7199 Merge pull request 'clan_cli secrets generate: fix type in error msg' (#890) from interactive_secrets into main 2024-03-03 07:43:48 +00:00
3478dea8b2 clan_cli secrets generate: fix type in error msg 2024-03-03 08:40:22 +01:00
ce3fc6973b clan_vm_manager: Fix dynamic join 2024-03-03 13:50:49 +07:00
c228d72da2 Merge pull request 'interactive_secrets' (#885) from interactive_secrets into main 2024-03-03 06:15:44 +00:00
127009b303 clan_cli: history_add now returns newly added HistoryEntry. clan-vm-manager: Join now uses signals instead of callbacks. 2024-03-03 12:47:18 +07:00
ed653fa8b9 fix pyproject syntax, ignore E731 2024-03-03 06:20:08 +01:00
b8da149453 clan-cli sops: fix super class interface compliance 2024-03-03 06:20:08 +01:00
a23c251b09 clan-cli secrets: actually check if only service needs regeneration 2024-03-03 06:20:08 +01:00
bf214011cf clan-vm-manager: Fix incorrect use of all Glib.idle_add uses 2024-03-03 11:21:12 +07:00
a1dcddf9b4 clan-cli: add interactive secrets/fact generation 2024-03-03 04:06:18 +01:00
f500aee786 clanCore secrets: rename toplevel secret to service 2024-03-02 11:43:20 +01:00
4cfd580447 outputs: pass secretsData directly 2024-03-02 11:43:20 +01:00
b1a4b4de96 clan-cli vms run: remove unused vm arg 2024-03-02 11:20:05 +01:00
108a37b0a3 clan-cli machines: cache machines_func via store 2024-03-02 11:20:05 +01:00
8c7db195ab Merge pull request 'devshells: cleanup' (#888) from DavHau-dave into main 2024-03-02 04:58:32 +00:00
f7bb5d7aaf devshells: cleanup 2024-03-02 11:55:15 +07:00
8e9053cf80 Merge pull request 'rename lol.clan to org.clan' (#887) from Mic92-main into main 2024-03-01 11:55:24 +00:00
9ec66195eb rename lol.clan to org.clan 2024-03-01 12:52:05 +01:00
93475ab4b3 Merge pull request 'devShells: one global python devshell + activation via command' (#886) from DavHau-dave into main 2024-03-01 11:22:09 +00:00
d1e8b1ed96 devShells: one global python devshell + activation via command
- this adds devShells.{system}.python
- a 'select-shell' command to switch between devshells
2024-03-01 18:16:38 +07:00
3acc4b4d25 Merge pull request 'clan_vm_manager: Add GKVStore to combat O(n2) runtimes. Add pygdb to devshell' (#884) from Qubasa-main into main 2024-03-01 03:49:53 +00:00
7932517b4a clan_vm_manager: Fix gdb package incompatible with aarch darwin 2024-03-01 10:46:35 +07:00
5f1191148e clan_vm_manager: Fix GLib.idle_add rexecuting the VM push multiple times because of missing GLib.SOURCE_REMOVE 2024-03-01 01:58:03 +07:00
d079bc85a8 clan_vm_manager: Working GKVStore that emulates the ListStore Object 2024-03-01 01:26:45 +07:00
df6683a0bd clan_vm_manager: Add GKVStore to combat O(n2) runtimes. Add pygdb to devshell 2024-02-29 22:46:09 +07:00
4b3b573e8c Merge pull request 'writers: fix bug by typo' (#883) from DavHau-dave into main 2024-02-27 15:25:28 +00:00
e930e14238 writers: fix bug by typo 2024-02-27 22:21:42 +07:00
2ccf32c36b Merge pull request 'merge-after-ci: rewrite according to #814' (#882) from DavHau-dave into main 2024-02-27 11:35:26 +00:00
398a61acbc merge-after-ci: rewrite according to #814 2024-02-27 18:32:11 +07:00
fdedf40e27 formatting: exclude script-writers.nix
Was copied from nixpkgs -> Keeping the diff low in order to upstream easier
2024-02-27 18:20:33 +07:00
45fd64a930 script-writers: add wrapping support (makeWrapperArgs) 2024-02-27 18:20:33 +07:00
31722d9dc0 script-writers: init (copied from nixpkgs) 2024-02-27 18:20:33 +07:00
d804c6059d Merge pull request 'clan-vm-manager: Moved switch from list view to VM object.' (#881) from Qubasa-main into main 2024-02-26 20:56:55 +00:00
4d1437b5cc clan-vm-manager: Moved switch from list view to VM object. 2024-02-27 03:53:19 +07:00
58bc8d162d Merge pull request 'Automatic flake update - 2024-02-26T00:00+00:00' (#880) from flake-update-2024-02-26 into main 2024-02-26 09:22:27 +00:00
d12019d290 fix formatting 2024-02-26 16:19:30 +07:00
Clan Merge Bot
1918cfd707 update flake lock - 2024-02-26T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/d07de570ba05cec2807d058daaa044f6955720c7' (2024-02-10)
  → 'github:nix-community/disko/23d308f0059955e3719efc81a34d1fc0369fbb74' (2024-02-22)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/843e2f04c716092797ffa4ce14c446adce2f09ef' (2024-02-08)
  → 'github:nix-community/nixos-generators/f4631dee1a0fd56c0db89860e83e3588a28c7631' (2024-02-22)
• Updated input 'nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/f5af57d3ef9947a70ac86e42695231ac1ad00c25' (2023-09-03)
  → 'github:nix-community/nixpkgs.lib/e623008d8a46517470e6365505f1a3ce171fa46a' (2024-02-18)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/bdc57436da855500d44e9c1ce7450c0772e1cfa1' (2024-02-11)
  → 'github:NixOS/nixpkgs/2a34566b67bef34c551f204063faeecc444ae9da' (2024-02-25)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2eb7c4ba3aa75e2660fd217eb1ab64d5b793608e' (2024-02-11)
  → 'github:Mic92/sops-nix/2874fbbe4a65bd2484b0ad757d27a16107f6bc17' (2024-02-25)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/ac599dab59a66304eb511af07b3883114f061b9d' (2024-02-07)
  → 'github:numtide/treefmt-nix/e497a9ddecff769c2a7cbab51e1ed7a8501e7a3a' (2024-02-25)
2024-02-26 00:00:15 +00:00
067da45082 Merge pull request 'clan-vm-manager: Fix ui state desync on build error. Add build progress bar' (#879) from Qubasa-main into main 2024-02-25 19:03:44 +00:00
0a8b8713d9 clan-vm-manager: Fix ui state desync on build error. Add build progress bar 2024-02-26 01:59:45 +07:00
4993b98258 Merge pull request 'clan_vm_manager: Fix qmp shutdown command, bad socket error on retried shutdown' (#878) from Qubasa-main into main 2024-02-25 18:21:43 +00:00
183c1f4235 clan_vm_manager: Fix qmp shutdown command, bad socket error on retried shutdown 2024-02-26 01:18:13 +07:00
ea7b0c8b90 Merge pull request 'clan_vm_manager: Improve VM start and stop switch. Switch will be disabled while stopping vm' (#877) from Qubasa-main into main 2024-02-25 18:11:38 +00:00
27b9c8915b clan_vm_manager: Improve VM start and stop switch. Switch will be disabled while stopping vm 2024-02-26 01:04:09 +07:00
36771f3ecd Merge pull request 'Also commit files when adding machines/users or removing secrets' (#876) from Mic92-main into main 2024-02-22 15:15:21 +00:00
52fcc91479 Also commit files when adding machines/users or removing secrets 2024-02-22 16:12:11 +01:00
65d2a4e081 secrets: commit when renaming secrets 2024-02-22 15:59:12 +01:00
9dc362437c Merge pull request 'borgbackup: drop comment from string' (#875) from Mic92-main into main
Reviewed-on: clan/clan-core#875
2024-02-22 14:45:07 +00:00
6eb8fe47c4 borgbackup: drop comment from string
Looks weird in the logs.
2024-02-22 14:45:07 +00:00
7208d63e78 borgbackup: drop comment from string
Looks weird in the logs.
2024-02-22 15:42:19 +01:00
01f1a6900a Merge pull request 'print backup archive ids instead of bare objects' (#874) from Mic92-main into main 2024-02-22 14:29:47 +00:00
12ce8238f1 print backup archive ids instead of bare objects 2024-02-22 15:26:20 +01:00
c5071bc212 Merge pull request 'encrypt backups by default' (#873) from Mic92-main into main 2024-02-22 14:06:07 +00:00
81fc60eef8 encrypt backups by default 2024-02-22 15:03:22 +01:00
bb25e136c3 Merge pull request 'secret cli: accept a pattern in secrets list' (#872) from Mic92-main into main 2024-02-22 13:25:07 +00:00
a1e2a4f64a secret cli: accept a pattern in secrets list 2024-02-22 14:21:53 +01:00
943c19939a Merge pull request 'borgbackup: use persistent timers' (#871) from Mic92-main into main 2024-02-22 12:50:25 +00:00
17d7eec0ae borgbackup: use persistent timers 2024-02-22 13:47:09 +01:00
7b4e76df29 Merge pull request 'add lychee link checker' (#870) from Mic92-main into main 2024-02-21 16:21:48 +00:00
1cb33a5c6c add lychee link checker 2024-02-21 17:18:28 +01:00
cd11f6ad10 Merge pull request 'Updating contribution documentation' (#869) from Mic92-main into main 2024-02-21 16:05:50 +00:00
67ceba6637 Updating contribution documentation 2024-02-21 17:02:13 +01:00
1330c60190 drop obsolete documentation 2024-02-21 17:02:13 +01:00
e8d4cd9936 Merge pull request 'drop obsolete documentation' (#868) from Mic92-main into main 2024-02-21 15:54:47 +00:00
537a1ae87f drop obsolete documentation 2024-02-21 16:51:27 +01:00
0aa876a06c Merge pull request 'clan-cli: remove unused flag' (#867) from Mic92-fix-cross-system into main 2024-02-21 10:19:26 +00:00
457e45d989 clan-cli: remove unused flag 2024-02-21 10:55:53 +01:00
1356ca9b8c fix cross-system deploy
This allows to be nixpkgs.pkgs and deploy systems of a different arch.
2024-02-21 10:55:53 +01:00
df8074100d Merge pull request 'README: fix links harder' (#866) from fix_links into main 2024-02-21 09:25:12 +00:00
d441f1d60c Merge pull request 'clan-vm-manager: Fix double instantiation of Singleton. clan_cli: Shorten filepath of logging messages' (#865) from Qubasa-main into main 2024-02-21 09:23:21 +00:00
a0097dab66 README: fix links harder 2024-02-21 10:22:09 +01:00
6c17fa648f clan_cli: Add exception handling in logger 2024-02-21 16:20:01 +07:00
51b087f7ae clan-vm-manager: Fix double instantiation of Singleton. clan_cli: Shorten filepath of logging messages 2024-02-21 16:16:58 +07:00
c340831edd Merge pull request 'README: fix links' (#864) from fix_links into main 2024-02-21 09:15:49 +00:00
c3dc315576 README: fix links 2024-02-21 10:12:41 +01:00
ff3a1dc928 Merge pull request 'secret_store: drop update_check and generate_hash as abstract methods' (#863) from Mic92-target_host into main 2024-02-20 18:01:51 +00:00
3695a5adf2 disable vgpu on non-nixos systems 2024-02-20 18:58:38 +01:00
4d404cfc50 secret_store: drop update_check and generate_hash as abstract methods
Only password implements those just now
2024-02-20 18:58:38 +01:00
7091b09fa7 Merge pull request 'secrets: add git support when updating secrets' (#862) from Mic92-target_host into main 2024-02-20 11:45:13 +00:00
77c84e7471 secrets: add git support when updating secrets 2024-02-20 12:41:52 +01:00
413e172cbd Merge pull request 'abstract_fixes' (#861) from abstract_fixes into main 2024-02-20 10:51:42 +00:00
3b975ed993 clan-cli SecretStore: remove generate_hash from base class 2024-02-20 11:48:13 +01:00
36baec8d48 clan-cli SecretStore: implement update_check in base class 2024-02-20 11:47:53 +01:00
eb8d5167e7 Merge pull request 'sops: unbreak edit flags' (#860) from Mic92-target_host into main 2024-02-20 10:18:17 +00:00
b358089488 sops: unbreak edit flags 2024-02-20 11:07:00 +01:00
36b20f18d4 Merge pull request 'add option to set defaultGroups for secrets' (#858) from Mic92-target_host into main 2024-02-16 16:29:28 +00:00
52c6ad548d improve error message if group does not exists 2024-02-16 17:26:20 +01:00
57e9b27ff8 add option to set defaultGroups for secrets 2024-02-16 17:26:20 +01:00
661004972b Merge pull request 'make secrets stores inherit from an interface' (#857) from Mic92-target_host into main 2024-02-16 14:00:20 +00:00
714f3b0378 upload_secrets: call update_check directly without introspection 2024-02-16 14:57:01 +01:00
87f301122e split of generate_secrets method into smaller functions 2024-02-16 14:48:46 +01:00
53d658a3c0 make facts stores inherit from an interface 2024-02-16 14:47:39 +01:00
9257f140ba make secrets stores inherit from an interface 2024-02-16 14:47:28 +01:00
b68e39e8fa Merge pull request 'demo script' (#856) from Qubasa-HEAD into main 2024-02-16 10:55:02 +00:00
c566872f05 Working demo script 2024-02-16 17:51:55 +07:00
446039b02b Working demo script 2024-02-16 17:47:34 +07:00
5a69bbe93e demo script 2024-02-16 17:47:05 +07:00
a715364338 Merge pull request 'clan-vm-manager: Added clan icon to trayicon' (#855) from Qubasa-main into main 2024-02-16 09:14:08 +00:00
280bee0861 clan-vm-manager: Fixing vm starting. 2024-02-16 16:10:49 +07:00
7bf1c0e42a Merge pull request 'waypipe: disable gpu for now' (#854) from Mic92-target_host into main 2024-02-16 08:55:35 +00:00
81545766a0 update comments about virtio-gpu 2024-02-16 09:52:13 +01:00
4e0ae54471 waypipe: disable gpu for now 2024-02-16 09:50:53 +01:00
4f7f34f9b4 clan-vm-manager: Added clan icon to trayicon 2024-02-16 12:25:06 +07:00
7fe38a9a80 Merge pull request 'add waypipe user to video group' (#853) from Mic92-target_host into main 2024-02-15 18:41:04 +00:00
95820905f9 waypipe: add fixed uid for user 2024-02-15 19:33:01 +01:00
be77d365e7 Merge pull request 'add waypipe user to video group' (#852) from Mic92-target_host into main
Reviewed-on: clan/clan-core#852
2024-02-15 18:31:39 +00:00
897acfaf6b add waypipe user to video group 2024-02-15 18:31:39 +00:00
30cb4c0eed add waypipe user to video group 2024-02-15 19:30:51 +01:00
50c8c2070b Merge pull request 'vms: move qemu_command to its own module' (#851) from Mic92-target_host into main 2024-02-15 16:30:01 +00:00
0200016dd2 vms: move qemu_command to its own module 2024-02-15 17:25:24 +01:00
658758302a Merge pull request 'vms: smaller cleanups' (#850) from Mic92-target_host into main 2024-02-15 16:23:24 +00:00
8e780b2a8c vms: drop unused xchdir 2024-02-15 17:19:43 +01:00
a399cbb8d9 vms: move virtiofsd/waypipe into their own modules 2024-02-15 17:19:31 +01:00
eacda36bb3 Merge pull request 'fix fact store' (#849) from Mic92-target_host into main 2024-02-15 11:27:59 +00:00
4943c33307 add file prefix for nix 2.19 or newer 2024-02-15 12:24:18 +01:00
2e900d943d Merge pull request 'waypipe: add more environment variables' (#848) from a-kenji-wayland-module-env-add into main 2024-02-15 10:09:12 +00:00
d7d33f6c25 waypipe: add more environment variables 2024-02-15 11:03:27 +01:00
58073375e4 Merge pull request 'add factsStore modules' (#839) from fact_store into main 2024-02-15 09:46:01 +00:00
6871b29d15 vms: use vm fact/secret-store 2024-02-15 10:41:25 +01:00
98139ac48d add factsStore modules 2024-02-15 10:41:25 +01:00
f9f428b960 Merge pull request 'waypipe: add wayland environment' (#847) from a-kenji-wayland-module-env into main 2024-02-15 09:01:49 +00:00
99bda8e099 waypipe: add wayland environment 2024-02-15 09:58:56 +01:00
06721b0c5a Merge pull request 'optimize filesystem mount flags' (#846) from Mic92-target_host into main 2024-02-14 12:06:47 +00:00
7cab50c088 optimize filesystem mount flags
perf!
2024-02-14 13:01:47 +01:00
1cc6e74297 Merge pull request 'clan_vm_manager: --debug enables debug mode in clan_cli too' (#840) from Qubasa-add_spinner into main 2024-02-14 08:43:14 +00:00
30850eef22 clan_cli: Added longer timeout for test 2024-02-14 15:40:03 +07:00
de69d3139b Merge pull request 'waypipe: rename systemd unit' (#845) from a-kenji-waypipe/rename-system-service into main 2024-02-13 15:45:29 +00:00
5ef2257ed1 waypipe: rename systemd unit 2024-02-13 16:42:29 +01:00
436e4e3882 Merge pull request 'waypipe: improve default module' (#844) from a-kenji-improve/module/waypipe into main 2024-02-13 15:40:11 +00:00
3ba4954c8d waypipe: improve default module 2024-02-13 16:37:14 +01:00
82e5e57e20 Merge pull request 'Fix demo script' (#843) from a-kenji-demo/improve/script into main 2024-02-13 15:18:23 +00:00
91c36a33da Fix demo script
The `--wayland` cli option is now a module option.
2024-02-13 16:15:36 +01:00
2f567db623 Merge pull request 'waypipe: improve default module' (#842) from a-kenji-waypipe/improve into main 2024-02-13 15:08:03 +00:00
e46315cab8 waypipe: improve default module 2024-02-13 16:02:46 +01:00
2c90664456 Merge pull request 'vms: enable sysusers' (#841) from Mic92-target_host into main 2024-02-13 13:20:02 +00:00
7a3fcd3deb vms: enable sysusers 2024-02-13 14:14:54 +01:00
2744d5724b Merge pull request 'switch to sops-nix experimental branch' (#832) from Mic92-target_host into main 2024-02-13 13:01:01 +00:00
952f976ea7 fix virtiofsd in CIs 2024-02-13 13:57:52 +01:00
b15c21f800 drop check for /var/lib/nixos 2024-02-13 12:44:22 +01:00
7cfce69504 demo.sh: make relative path configureable 2024-02-13 11:45:42 +01:00
8f98f0e8b7 also use qcow2 for volatile state 2024-02-13 11:45:42 +01:00
3bf94ab0fc use virtio-console instead of serial for vm 2024-02-13 11:45:42 +01:00
11ac50c17b format rootfs in vm itself 2024-02-13 11:45:42 +01:00
07caab537f drop unused mounts 2024-02-13 11:45:42 +01:00
a56dc3bf8c simplify vmstate directory 2024-02-13 11:45:42 +01:00
7f8ba25a5b qemu: disable sea-bios and option rom 2024-02-13 11:45:42 +01:00
ef202a8150 switch to sops-nix experimental branch 2024-02-13 11:45:23 +01:00
d6b3e03d70 vms: integrate virtiofsd 2024-02-13 11:44:17 +01:00
03b9183e04 clan_cli: Added lazy qmp 2024-02-13 16:44:09 +07:00
92ec3fb9f9 test_vms_cli: Trying new way of testing 2024-02-13 16:44:09 +07:00
87dbc99cab clan_cli: Made qmp implementation lazy 2024-02-13 16:44:09 +07:00
ef6d7cee1a clan_vm_manager: started spinner. not fully working yet 2024-02-13 16:44:09 +07:00
4d1bde083a UI: Improve README 2024-02-13 16:44:09 +07:00
403b874522 clan_vm_manager: --debug enables debug mode in clan_cli too 2024-02-13 16:44:09 +07:00
0dadae9087 Merge pull request 'update flake lock' (#838) from Qubasa-main into main 2024-02-12 12:03:30 +00:00
b39c860379 fix borgbackup check
we need to switch to the classical test environment again, because borg
was complaining otherwise
2024-02-12 12:59:32 +01:00
7d301b7e3c update flake lock 2024-02-12 14:52:01 +07:00
33787a6aab Merge pull request 'UI: Added tray icon' (#831) from Qubasa-main into main 2024-02-12 07:19:59 +00:00
0ce8bcd018 clan_vm_manager: Added VM shutdown timeout 2024-02-12 14:16:44 +07:00
7b48535a98 UI: Added tray icon 2024-02-12 13:43:54 +07:00
f166da1621 Merge pull request 'allow passing of extra_config into machines' (#834) from lassulus-extra_config into main 2024-02-11 07:43:52 +00:00
eebd9d0b4a allow passing of extra_config into machines 2024-02-11 08:40:41 +01:00
10cbe11e53 nixosModules clanCore: fix iso format 2024-02-10 13:27:51 +01:00
2530ba52ac Merge pull request 'waypipe: add more default settings' (#836) from a-kenji-waypipe/add into main 2024-02-10 12:24:55 +00:00
798bbe188c waypipe: add more default settings 2024-02-10 13:22:16 +01:00
237d7aee4a Merge pull request 'clanModules: add waypipe service' (#835) from a-kenji-init/waypipe into main 2024-02-10 12:03:49 +00:00
105209cfb9 clanModules: add waypipe service 2024-02-10 12:32:06 +01:00
cc8d6b281b Merge pull request 'vms: init graceful shutdown for GUI' (#833) from DavHau-dave into main 2024-02-09 12:58:52 +00:00
02dd132e08 vms: init graceful shutdown for GUI
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI

the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
6af8423f1e Merge pull request 'UI: Fixed incorrect display of cLAN icon in window switcher' (#830) from Qubasa-main into main 2024-02-08 08:08:28 +00:00
8a9d3d3230 UI: Fixed incorrect display of cLAN icon in window switcher 2024-02-08 15:00:36 +07:00
13457eca0a Merge pull request 'Clan VM Manager: add dropdown to add more machines' (#827) from hsjobeki-main into main 2024-02-08 07:40:06 +00:00
0221e7176b Clan VM Manager: add dropdown to add more machines 2024-02-08 14:36:47 +07:00
7326862c1a Merge pull request 'UI: Improved Join card display' (#829) from Qubasa-main into main 2024-02-08 07:31:30 +00:00
0ee4dcd782 UI: Improved Join card display 2024-02-08 14:28:34 +07:00
e0ed00ef5c Merge pull request 'UI: Fixed style.css not working when installed' (#828) from Qubasa-main into main 2024-02-08 07:13:06 +00:00
a2ce341995 UI: Fixed style.css not working when installed 2024-02-08 14:10:17 +07:00
6ddb8dfe9d Merge pull request 'UI: Added joining multiple clans one after another over clan url' (#826) from Qubasa-main into main 2024-02-07 10:19:01 +00:00
10578e7611 UI: Added joining multiple clans one after another over clan url 2024-02-07 17:16:20 +07:00
96b98dcbed Merge pull request 'Clan VM Manager: detect if clan exists' (#825) from hsjobeki-main into main 2024-02-07 09:20:33 +00:00
030cbd24ce
Clan VM Manager: detect if clan exists 2024-02-07 16:08:48 +07:00
045c5e608b Merge pull request 'Clan VM Manager: init per vm settings handler' (#824) from hsjobeki-main into main 2024-02-07 08:43:58 +00:00
d20902cef4
Clan VM Manager: init per vm settings handler 2024-02-07 15:41:18 +07:00
a1a433b654 Merge pull request 'clan_manager: UI is now a singelton.' (#822) from Qubasa-main into main 2024-02-07 05:06:11 +00:00
869c01bf95 clan_manager: UI is now a singelton. 2024-02-07 12:03:12 +07:00
68ac0cd3ec Merge pull request 'clan-cli: add simple flash command' (#821) from lassulus-flaash into main 2024-02-07 04:31:52 +00:00
67d264263c nixosModules zerotier: remove unneeded default 2024-02-07 05:26:01 +01:00
b780754621 clan-cli: add simple flash command 2024-02-07 05:26:01 +01:00
cd45bb3174 Merge pull request 'add requireExplicitUpdate option for mobile devices' (#820) from Mic92-target_host into main 2024-02-06 16:59:03 +00:00
6fe6229498 add requireExplicitUpdate option for mobile devices 2024-02-06 17:55:34 +01:00
7c598e6278 Merge pull request 'document build host option' (#819) from Mic92-target_host into main 2024-02-06 16:30:04 +00:00
531a899817 document build host option 2024-02-06 17:27:06 +01:00
e912b125c3 Merge pull request 'remove unused ssh.run method' (#818) from Mic92-target_host into main 2024-02-06 16:24:47 +00:00
614d1aecfd set nixpkgs.pkgs for secrets generation
This allows us to use the same nixpkgs instance for all machines.
2024-02-06 17:21:42 +01:00
be3a75bbd7 add support for build machines 2024-02-06 17:21:42 +01:00
2315dba2a9 rename machine.host to machine.target_host 2024-02-06 17:21:42 +01:00
6e57122da8 rename target_host to target_host_address 2024-02-06 17:21:42 +01:00
301a6b6a23 machines/update: get flake_attr from machine class 2024-02-06 17:21:42 +01:00
a2f0d077c8 remove unused ssh.run method 2024-02-06 15:47:32 +01:00
8234f127e5 Merge pull request 'machines: don't ignore errors when parsing secretsData json' (#817) from Mic92-target_host into main 2024-02-06 14:18:38 +00:00
c66c25aeb7 machines: don't ignore errors when parsing secretsData json 2024-02-06 15:15:21 +01:00
534ebb6094 Merge pull request 'skip machines without target_host when running clan machines update' (#816) from Mic92-target_host into main 2024-02-06 14:07:31 +00:00
91f26a4743 skip machines without target_host when running clan machines update 2024-02-06 15:04:19 +01:00
71d14eb178 Merge pull request 'move checks if targetHost/buildHost is set to cli' (#815) from Mic92-target_host into main 2024-02-06 13:54:50 +00:00
ad1a87fc14 move checks if targetHost/buildHost is set to cli 2024-02-06 14:51:44 +01:00
35bb076729 Merge pull request 'clan_manager: Implemented machine_icon, machine_description' (#813) from Qubasa-main into main 2024-02-06 13:16:31 +00:00
ab05cfde30 clan_manager: Implemented machine_icon, machine_description 2024-02-06 20:13:18 +07:00
4d18ce2366 Merge pull request 'cli,nix: Add machine_icon, machine_description to vm' (#812) from Qubasa-main into main 2024-02-06 12:29:32 +00:00
21443d0647 cli,nix: Add machine_icon, machine_description 2024-02-06 19:25:34 +07:00
868aba47b5 Merge pull request 'clanCore: fix deploymentAddress -> targetHost alias' (#811) from Mic92-target_host into main 2024-02-06 09:57:56 +00:00
923696c21c clanCore: fix deploymentAddress -> targetHost alias 2024-02-06 10:55:07 +01:00
99c432fcb8 Merge pull request 'Automatic flake update - 2024-02-05T00:00+00:00' (#804) from flake-update-2024-02-05 into main 2024-02-06 04:20:53 +00:00
Clan Merge Bot
3b5465d24d update flake lock - 2024-02-05T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/07f6395285469419cf9d078f59b5b49993198c00' (2024-01-11)
  → 'github:hercules-ci/flake-parts/b253292d9c0a5ead9bc98c4e9a26c6312e27d69f' (2024-02-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/50071d87c75300c037e28439c5176c3933b9fce5' (2024-01-28)
  → 'github:NixOS/nixpkgs/5d75993fa5feaa333f3eadd83e0a08fc34432acc' (2024-02-04)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/73bf36912e31a6b21af6e0f39218e067283c67ef' (2024-01-28)
  → 'github:Mic92/sops-nix/23f61b897c00b66855074db471ba016e0cda20dd' (2024-02-04)
2024-02-06 04:17:06 +00:00
6a62018f1d Merge pull request 'build-clan: Removed unecessary arg, machineDescription and machineIcon' (#810) from Qubasa-main into main 2024-02-05 09:58:58 +00:00
4421797f30 build-clan: Removed unecessary arg, machineDescription and machineIcon 2024-02-05 16:56:13 +07:00
bfd525b042 Merge pull request 'clan-cli: add autocommits for facts/secrets' (#809) from lassulus-autocommits into main 2024-02-05 09:08:29 +00:00
815527ec2b clan-cli secrets: commit facts/secrets after generating them 2024-02-05 10:03:10 +01:00
e265537f69 clan-cli secrets: remove debug output 2024-02-05 10:03:10 +01:00
8114cebaa4 clan-cli git: add commit_files function 2024-02-05 10:03:10 +01:00
0e076e52c8 Merge pull request 'vm_manager: Fixed uri join and then vm start not working' (#808) from Qubasa-main into main 2024-02-05 09:01:21 +00:00
fd44eeb384 vm_manager: Fixed uri join and then vm start not working 2024-02-05 15:57:14 +07:00
08c1e13dce Merge pull request 'async join' (#807) from hsjobeki-main into main 2024-02-05 08:07:51 +00:00
c52c83002c
async join 2024-02-05 15:05:14 +07:00
1a8a6acfb1 Merge pull request 'Added machineIcon and machineDescription to buildClan' (#806) from Qubasa-main into main 2024-02-05 07:21:18 +00:00
b3815527a5 Added machineIcon and machineDescription to buildClan 2024-02-05 14:18:40 +07:00
fc50d8748a Merge pull request 'Starting to implement logs' (#799) from Qubasa-main into main 2024-02-05 06:40:26 +00:00
38cadd0ab2 Added --debug flag clan command in nix tests 2024-02-05 13:37:35 +07:00
33a10f76c0 UI: Fixed multiple connects to signal 2024-02-05 13:37:35 +07:00
2c00ccaea6 Merge pull request 'nixosModules zerotier: fix type of dns' (#805) from lassulus-zerotier-dns into main 2024-02-05 01:35:04 +00:00
a2eb6f219d nixosModules zerotier: fix type of dns 2024-02-05 02:31:14 +01:00
ae256b666e Merge pull request 'clanCore zerotier: set default values in config for merging' (#803) from lassulus-zerotier-settings2 into main 2024-02-03 08:29:06 +00:00
b39fda8d85 clanCore zerotier: set default values in config for merging 2024-02-03 09:26:04 +01:00
eaf2ac3c5c Merge pull request 'clan-cli update: upload only local paths from localhost' (#802) from lassulus-fast_flake_archive into main 2024-02-03 06:56:37 +00:00
31188648f0 clan-cli update: remove legacy argument 2024-02-03 07:53:15 +01:00
6a62065cdf clan-cli update: upload only local paths from localhost 2024-02-03 07:53:15 +01:00
20257b88ed Merge pull request 'clanCore zerotier: add settings option' (#801) from lassulus-zerotier-settings into main 2024-02-03 03:51:53 +00:00
a52f1e3594 clanCore zerotier: add settings option 2024-02-03 04:48:54 +01:00
3bff29b9fe Merge pull request 'clan-cli: secrets check command' (#800) from lassulus-check_secrets into main 2024-02-02 16:43:25 +00:00
315cdea6ce clan-cli machines: remove debug prints 2024-02-02 17:40:19 +01:00
605b03bb91 clan-cli password-store: remove debug print 2024-02-02 17:40:19 +01:00
bcdde990ff clan-cli secrets: add check command 2024-02-02 17:40:19 +01:00
841581bfc4 Merge pull request 'rename deployment address to target address' (#798) from Mic92-target_host into main 2024-02-02 09:42:29 +00:00
3538cf2e46 rename deployment address to target address
This is a prepares having a build server for deployment
2024-02-02 16:39:29 +07:00
7daca31db7 Merge pull request 'Starting to implement logs' (#796) from Qubasa-main into main 2024-02-02 05:07:39 +00:00
16562946fe vm-manager: Added log console printing on vm start. Added python logging module 2024-02-02 12:04:30 +07:00
789f3132c5 Merge pull request 'multi join via cli' (#795) from hsjobeki-main into main 2024-02-02 04:01:49 +00:00
e57169cb29
multi join via cli 2024-02-02 10:58:28 +07:00
90cf41c365 Merge pull request 'halalify zerotierone' (#794) from lassulus-halalify into main 2024-02-01 14:46:53 +00:00
b4c6092cc0 halalify zerotierone 2024-02-01 15:44:13 +01:00
79a8c40f40 Merge pull request 'zerotier generate: kill process group' (#793) from lassulus-zerotier-kill-pg into main 2024-02-01 09:14:17 +00:00
86b248d457 zerotier generate: retry if port allocation fails 2024-02-01 10:11:30 +01:00
b43a29dadc Merge pull request 'zerotier generate: kill process group' (#792) from lassulus-zerotier-kill-pg into main 2024-02-01 09:06:22 +00:00
93874705fe zerotier generate: kill process group 2024-02-01 10:01:28 +01:00
59feea9e8a Merge pull request 'qemu: init python modules for qmp and qga' (#790) from DavHau-dave into main 2024-02-01 05:40:06 +00:00
56b6907740 qemu: init python modules for qmp and qga 2024-02-01 12:32:21 +07:00
14917b7d56 Starting to implement logs 2024-02-01 10:21:58 +07:00
cc21108c59 Merge pull request 'vms: rename wayland attrs to waypipe' (#789) from a-kenji-rename-wayland-to-waypipe into main 2024-02-01 03:17:12 +00:00
533012af7d vms: rename wayland attrs to waypipe
And remove the options from the cli interface.
2024-02-01 10:14:36 +07:00
cdeb409c53 Merge pull request 'vms: wayland attr specified in configuration' (#787) from a-kenji-allow/wayland-in-config into main 2024-02-01 02:06:52 +00:00
f89c9b00dd vms: wayland attr specified in configuration 2024-02-01 09:00:43 +07:00
110e790246 Merge pull request 'syncthing: remember auto accepted folders, if introduced' (#786) from a-kenji-syncthing-default-accept into main 2024-01-31 15:39:50 +00:00
c81e9857da syncthing: remember auto accepted folders, if introduced
Makes it more compatible with restoring state
2024-01-31 22:24:46 +07:00
b5edd7ca08 Merge pull request 'group clans by url' (#783) from hsjobeki-main into main 2024-01-31 04:23:15 +00:00
c1bc1c942a
group clans by url 2024-01-31 11:20:35 +07:00
6107b01a3f Merge pull request 'vm-state: fix and improve testing' (#782) from DavHau-dave into main 2024-01-31 04:07:41 +00:00
59fa63eba9 Reapply "vm-state: fix and improve testing"
This reverts commit 99092f6e76.

vm-state: revert sysusers, improve testing

zerotier: enable persistence

vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
c69f68feee Merge pull request 'syncthing: make inotify tuning overrideable' (#781) from a-kenji-syncthing-inotify into main 2024-01-31 03:47:06 +00:00
dd460e9f4f syncthing: make inotify tuning overrideable 2024-01-31 10:44:31 +07:00
b99f569973 Merge pull request 'some minor secrets fixups' (#780) from lassulus-secrets-fixes into main 2024-01-30 11:13:35 +00:00
961eb26335 secrets modules: pass secrets as bytes 2024-01-30 12:11:05 +01:00
0dbfe52d62 secrets: add sandbox user 2024-01-30 12:11:05 +01:00
a0ebf882c5 Merge pull request 'Machine __str__ impl' (#779) from Qubasa-heads/origin/Qubasa-fix into main 2024-01-30 08:38:51 +00:00
649e345585 Machine __str__ impl 2024-01-30 15:32:35 +07:00
1f108f8913 Merge pull request 'Added demo.sh to prepare demo environment' (#777) from Qubasa-origin/Qubasa-fix into main 2024-01-30 08:04:49 +00:00
a3207f7011 UI: Fixed toggle button color on second time not changing 2024-01-30 15:02:05 +07:00
45e8917679 Added demo.sh to prepare demo environment 2024-01-30 14:42:22 +07:00
c9b2deb326 Merge pull request 'Demo version' (#776) from Qubasa-main into main 2024-01-30 07:05:55 +00:00
c00e5b3df3 Demo version 2024-01-30 14:02:52 +07:00
4e30c4cfff Merge pull request 'URI: Fixed removed url fragment' (#775) from Qubasa-main into main 2024-01-30 06:31:29 +00:00
52f5c890cc URI: Fixed removed url fragment 2024-01-30 13:28:12 +07:00
170c461ba1 Merge pull request 'CLI: Added grouping output for clan history list.' (#774) from Qubasa-main into main 2024-01-30 05:43:02 +00:00
a50d0f1743 CLI: Added grouping output for clan history list. 2024-01-30 12:39:52 +07:00
541f8be7b7 Merge pull request 'Fixed clan uri. Expand user, then resolve' (#773) from Qubasa-main into main 2024-01-30 05:20:52 +00:00
119a05d999 Fixed clan uri. Expand user, then resolve 2024-01-30 12:17:24 +07:00
c7b9db8b49 Merge pull request 'clan-cli: implement waypipe backend' (#772) from Mic92-main into main 2024-01-30 03:42:07 +00:00
c417157941 clan-cli: implement waypipe backend 2024-01-30 10:37:52 +07:00
9fef40258a cmd: skip print for zero-length bufs 2024-01-30 10:30:25 +07:00
a3d92a766e clan-cli: drop unused variables 2024-01-30 10:30:25 +07:00
80a335eb4c drop unused unfree_nixpkgs function 2024-01-30 10:30:25 +07:00
846d2c0f44 Merge pull request 'syncthing: add inotify' (#771) from a-kenji-syncthing/add/initify into main 2024-01-29 10:26:55 +00:00
dc4e9d8dd7 syncthing: add inotify 2024-01-29 11:23:32 +01:00
02045c589d Merge pull request 'clan-cli machines: get flake path via flake metadata' (#770) from lassulus-flake_dir into main 2024-01-29 09:17:26 +00:00
0366147235 clan-cli machines: get flake path via flake metadata 2024-01-29 09:54:30 +01:00
6b9f8b851e Merge pull request 'Revert "vm-state: fix and improve testing"' (#768) from DavHau-revert into main 2024-01-29 08:20:09 +00:00
99092f6e76 Revert "vm-state: fix and improve testing"
This reverts commit 6adc68a354.
2024-01-29 15:16:10 +07:00
549a5800a5 Merge pull request 'Secret mgmt problem' (#767) from Qubasa-main into main 2024-01-29 08:15:44 +00:00
f6c811e531 UI: Display error logs on VM crash. Fixed inspect_vm problem. 2024-01-29 15:11:57 +07:00
7937f3eaae Merge pull request 'package vsock-enabled waypipe' (#766) from Mic92-main into main 2024-01-29 07:29:22 +00:00
155a1ee98c Secret mgmt problem 2024-01-29 14:00:38 +07:00
dc4634b8eb package vsock-enabled waypipe 2024-01-29 11:48:08 +07:00
65a2fc9b14 Merge pull request 'flake.lock: Update' (#764) from a-kenji-fix/update/nixpkgs into main 2024-01-29 04:31:36 +00:00
f3498f3609 flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/fa5db12d76f9e8ee11e572cdbe021230e48b6afa' (2024-01-11)
  → 'github:nix-community/disko/f67ba6552845ea5d7f596a24d57c33a8a9dc8de9' (2024-01-29)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/246219bc21b943c6f6812bb7744218ba0df08600' (2023-12-04)
  → 'github:nix-community/nixos-generators/896f6589db5b25023b812bbb6c1f5d3a499b1132' (2024-01-24)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ada47602cea34540873ddf17e49c32b50fd70d2a' (2024-01-24)
  → 'github:NixOS/nixpkgs/50071d87c75300c037e28439c5176c3933b9fce5' (2024-01-28)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c0b3a5af90fae3ba95645bbf85d2b64880addd76' (2024-01-10)
  → 'github:Mic92/sops-nix/73bf36912e31a6b21af6e0f39218e067283c67ef' (2024-01-28)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/04f25d7bec9fb29d2c3bacaa48a3304840000d36' (2024-01-07)
  → 'github:numtide/treefmt-nix/c6153c2a3ff4c38d231e3ae99af29b87f1df5901' (2024-01-28)
2024-01-29 05:14:09 +01:00
a685dd1afe Merge pull request 'nix-direnv-watch-file -> watch-file' (#763) from Mic92-main into main 2024-01-29 04:11:13 +00:00
4a84d7da97 nix-direnv-watch-file -> watch-file 2024-01-29 11:02:43 +07:00
6adc68a354 vm-state: fix and improve testing
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
76c906c531 Merge pull request 'clan-cli secrets: generate secrets inside bubblewrap' (#761) from lassulus-bubblewrap into main 2024-01-24 18:23:31 +00:00
3afed7a563 clan-cli secrets: generate secrets inside bubblewrap 2024-01-24 19:20:07 +01:00
a3ef8ce832 Merge pull request 'clan-cli secrets: add secret_store as python class' (#733) from lassulus-HEAD into main 2024-01-24 14:52:14 +00:00
abaa218e27 clan-cli install: use new Machine interface, fix mypy error 2024-01-24 15:49:24 +01:00
6ba641c974 clan-cli update: use new Machine class interface 2024-01-24 15:49:12 +01:00
e1237499d0 clan-cli Machine: make deployment info lazy 2024-01-24 15:49:12 +01:00
3284224440 clan-cli backups: use new machine class for eval 2024-01-24 15:49:12 +01:00
9cf670ee29 test_vm_persistance: substitute clan-core repo 2024-01-24 15:49:12 +01:00
6b004fca6f machines.Machine: refactor flake_dir -> flake; use Machine class in vm 2024-01-24 15:49:12 +01:00
de885c3010 test_vm_persistance: add age keys 2024-01-24 15:49:12 +01:00
ce5e6bfd10 secret generators: run with set -efu -o pipefail 2024-01-24 15:49:12 +01:00
aee0ee4d5e move secret stores into clan_cli codebase 2024-01-24 15:49:12 +01:00
459dc0608b Merge pull request 'Fix zerotier in vms' (#759) from a-kenji-fix-zerotier-state-vm into main 2024-01-23 19:39:13 +00:00
f0895d5e3e fix zerotier in vms 2024-01-23 19:43:42 +01:00
8338944062 move python code in nixos Module to external file 2024-01-23 15:04:40 +01:00
09887037f5 WIP: clan-cli secrets: add secret_store as python class 2024-01-23 15:04:40 +01:00
7b953fe7ab Merge pull request 'prepare details view' (#755) from hsjobeki-main into main 2024-01-21 11:48:36 +00:00
6b00957d38
prepare details view 2024-01-21 12:46:04 +01:00
9e6ffcd9f9 Merge pull request 'add search bar' (#754) from hsjobeki-main into main 2024-01-21 11:16:14 +00:00
035a9f2358
add search bar 2024-01-21 12:13:15 +01:00
c5aef543b2 Merge pull request 'add join to list' (#753) from hsjobeki-main into main 2024-01-20 13:54:22 +00:00
7ac0292cdd
display id as subtitle 2024-01-20 14:51:37 +01:00
c98fdc08de Merge pull request 'add join to list' (#752) from hsjobeki-main into main 2024-01-20 12:21:23 +00:00
d0b075c217
add join to list 2024-01-20 13:18:43 +01:00
3be697d1e9 Merge pull request 'organize files and classes consistently' (#751) from hsjobeki-main into main 2024-01-20 09:15:48 +00:00
cd2125074f
organize files and classes consistently 2024-01-20 10:12:37 +01:00
ceebfccc82 Merge pull request 'UI: Added signal handling for stopped and started vm.' (#750) from Qubasa-main into main 2024-01-19 17:58:10 +00:00
70cf75830d Remove error from qemu_command 2024-01-19 18:54:54 +01:00
d956dbeb77 UI: Added signal handling for stopped and started vm. 2024-01-19 18:52:51 +01:00
0c167d1e51 Merge pull request 'localsend: add notes about future integrations' (#749) from a-kenji-localsend-notes into main 2024-01-19 16:02:42 +00:00
df574b0dcc localsend: add notes about future integrations 2024-01-19 16:59:32 +01:00
e9d3a71dbb Merge pull request 'Otherwise we loose our build inputs' (#747) from Mic92-main into main 2024-01-19 14:05:51 +00:00
3271e4b6b6 don't garbage collect in nix vm tests
Otherwise we loose our build inputs
2024-01-19 15:02:25 +01:00
a1f8690978 Merge pull request 'Improved error messages in clan_cli' (#746) from Qubasa-main into main 2024-01-19 13:13:46 +00:00
2da236b362 Improved error messages in clan_cli 2024-01-19 14:10:22 +01:00
a23bdaa0a1 Merge pull request 'Wrapped vm.run in cmd.run. Working --wayland' (#745) from Qubasa-main into main 2024-01-19 13:00:04 +00:00
60c4d231f8 Wrapped vm.run in cmd.run. Working --wayland 2024-01-19 13:56:17 +01:00
26259341d4 Merge pull request 'build-clan: force system override in secrets generators' (#744) from Mic92-main into main
Reviewed-on: clan/clan-core#744
2024-01-17 14:40:46 +00:00
4a3abf5fe9 build-clan: force system override in secrets generators 2024-01-17 14:40:46 +00:00
3bd33844c6 Merge pull request 'build-clan: don't set system with lib.mkForce' (#743) from Mic92-main into main 2024-01-17 14:28:27 +00:00
fb151b227d build-clan: don't set system with lib.mkForce 2024-01-17 15:25:29 +01:00
2d613e3933 Gtk4 migration (#693)
Co-authored-by: Qubasa <consulting@qube.email>
Reviewed-on: clan/clan-core#693
Co-authored-by: Johannes Kirschbauer <hsjobeki@gmail.com>
Co-committed-by: Johannes Kirschbauer <hsjobeki@gmail.com>
2024-01-17 12:11:49 +00:00
ae1745289d Merge pull request 'clanModules: init localsend module' (#741) from a-kenji-init/localsend into main 2024-01-17 10:25:29 +00:00
c94d2325ae clanModules: init localsend module 2024-01-17 11:12:09 +01:00
bd5ad0dc31 Merge pull request 'disable state home for now' (#740) from Mic92-main into main 2024-01-17 10:03:48 +00:00
1d2f003210 use upstream qemu for wayland feature 2024-01-17 11:00:45 +01:00
776b238d9c disable state home for now 2024-01-17 10:59:01 +01:00
5ce7819229 Merge pull request 'bump nixpkgs' (#739) from Mic92-main into main 2024-01-17 09:53:36 +00:00
7105ab1124 bump nixpkgs 2024-01-17 10:45:49 +01:00
de65c4062a Merge pull request 'docs: categorize via sub-directories for inclusion in website' (#738) from DavHau-main into main 2024-01-17 06:55:51 +00:00
a610db7192 docs: categorize via sub-directories for inclusion in website 2024-01-17 13:53:24 +07:00
0b291c656f Merge pull request 'state.nix: improve docs' (#732) from DavHau-main into main 2024-01-17 06:51:55 +00:00
312e8b2bc6 Merge pull request 'URI: Added support for #flake_attr' (#736) from Qubasa-main into main 2024-01-16 16:14:37 +00:00
f1acc44488 URI: Added support for #flake_attr 2024-01-16 17:11:26 +01:00
4a3a585e7c Merge pull request 'CLI: History supports multiple attrs from the same url now. Errors when executing the cli are formatted better' (#735) from Qubasa-main into main 2024-01-16 15:19:10 +00:00
d20f47ad5b CLI: History supports multiple attrs from the same url now. Errors when executing the cli are formatted better 2024-01-16 16:16:12 +01:00
1c7e806bca Merge pull request 'clanModules: disable nixos manual by default' (#734) from a-kenji-disable-manual into main 2024-01-16 14:21:23 +00:00
98e1c629c3 clanModules: disable nixos manual by default 2024-01-16 15:14:16 +01:00
c944fe8b48 state.nix: improve docs 2024-01-15 16:03:47 +07:00
07a0e1db09 Merge pull request 'add option to orbit moons' (#729) from Mic92-zerotier into main 2024-01-12 17:34:09 +00:00
876ffab3b1 add option to orbit moons 2024-01-12 18:31:18 +01:00
00876e2311 Merge pull request 'zerotier: add support for moons' (#728) from Mic92-zerotier into main 2024-01-12 17:28:42 +00:00
b1bb887dbf zerotier: add support for moons 2024-01-12 18:26:00 +01:00
50344b4937 Merge pull request 'cmd.py refactor part 7' (#727) from Qubasa-main into main 2024-01-12 16:41:21 +00:00
abfa2f218c cmd.py refactor part 7 2024-01-12 17:37:59 +01:00
c345c4c0ce Merge pull request 'cmd.py refactor part 6' (#726) from Qubasa-main into main 2024-01-12 16:25:16 +00:00
0c1d4a1d41 cmd.py refactor part 6 2024-01-12 17:21:48 +01:00
1a6983e031 cmd.py refactor part 6 2024-01-12 17:02:56 +01:00
6455b128a3 Merge pull request 'cmd.py refactor part 5' (#724) from Qubasa-main into main 2024-01-12 15:55:46 +00:00
ca5cc389ac cmd.py refactor part 5 2024-01-12 16:52:34 +01:00
969c79b426 Merge pull request 'Fixed duplicate logging issue with correct logging in ssh and in root logger' (#723) from Qubasa-main into main 2024-01-12 15:49:52 +00:00
2c2e4862ba Fixed duplicate logging issue with correct logging in ssh and in root logger 2024-01-12 16:46:44 +01:00
e2cc218aa6 add moonlight module 2024-01-12 16:02:24 +01:00
304dce0caa Merge pull request 'zerotier: configure alternative tcp fallback relay' (#721) from Mic92-HEAD into main 2024-01-12 14:15:54 +00:00
e941334ecf zerotier: configure alternative tcp fallback relay 2024-01-12 15:13:20 +01:00
30c7d61bbd Merge pull request 'revert logger changes in f7c6ab5888c5763c1ec5e4326f452946d915b1f6' (#720) from Mic92-HEAD into main 2024-01-12 13:52:27 +00:00
47f4ef2c31 revert logger changes in f7c6ab5888
This adds another logger to the logger in clan_cli.ssh which we do not want
2024-01-12 14:48:36 +01:00
25634a044b Merge pull request 'zt-tcp-relay: add clan module + test' (#719) from Mic92-HEAD into main 2024-01-12 13:27:52 +00:00
78cd5b3fec zt-tcp-relay: add clan module + test 2024-01-12 14:25:31 +01:00
50b757ab1d Merge pull request 'zt-tcp-relay: init at 2023-07-11' (#718) from Mic92-HEAD into main 2024-01-12 12:53:09 +00:00
e1729a0991 zt-tcp-relay: init at 2023-07-11 2024-01-12 13:49:36 +01:00
773630a9b9 Merge pull request 'drop qemu-rutabaga patches' (#717) from Mic92-HEAD into main 2024-01-12 11:27:07 +00:00
c86e465e35 drop qemu-rutabaga patches 2024-01-12 12:20:29 +01:00
1cdc2b8ed2 Merge pull request 'cmd: add a timeout in select' (#716) from Mic92-HEAD into main 2024-01-11 23:23:57 +00:00
796ef76893 cmd: add a timeout in select 2024-01-12 00:20:22 +01:00
a29f83de0f Merge pull request 'Re-added rlist.remove to counter busy loop' (#715) from Qubasa-main into main 2024-01-11 23:16:51 +00:00
05aaa180e0 cmd.py: Fix busy loop. 2024-01-12 00:13:21 +01:00
1d489438bd Re-added rlist.remove to counter busy loop 2024-01-12 00:08:15 +01:00
0c6dd1f042 Merge pull request 'cmd.py: Fix deadlock because of incorrect select usage' (#714) from Qubasa-main into main 2024-01-11 22:06:29 +00:00
0941367bb3 cmd.py: Fix deadlock because of incorrect select usage 2024-01-11 23:03:14 +01:00
c5b914594a Merge pull request 'Removed duplicate logging messages' (#713) from Qubasa-main into main 2024-01-11 21:49:30 +00:00
3351f87a7f Removed duplicate logging messages 2024-01-11 22:46:29 +01:00
04b579f2d3 Merge pull request 'cmd.py refactor part 4' (#707) from Qubasa-main into main 2024-01-11 21:31:42 +00:00
d1ca0eaf80 Identified deadlocking funciton 2024-01-11 22:28:35 +01:00
4d4c09da80 Enabled logging DEBUG in pytest 2024-01-11 22:14:55 +01:00
f7c6ab5888 Working test_secrets_generate 2024-01-11 21:48:39 +01:00
16b043f508 cmd.py: Fixing bug: missing output because of forgotten flush() call 2024-01-11 21:11:49 +01:00
0133ccd5f7 Fixed missing log.BOTH and error_msg at prev refactors 2024-01-11 21:11:49 +01:00
2ae439ec52 cmd.py refactor part 4 2024-01-11 21:11:49 +01:00
0d9f0c3ec1 Merge pull request 'make zerotier name configureable' (#711) from Mic92-zerotier into main 2024-01-11 17:05:54 +00:00
72409a800a schema-check: set clanName dummy 2024-01-11 18:02:50 +01:00
8d63bb8fd1 drop deadcode 2024-01-11 18:00:42 +01:00
32ec520fa5 drop runSchemaTests/runMockApi from checks 2024-01-11 17:53:06 +01:00
f6b6229f78 schema: set also clanName
this is usually set by buildClan
2024-01-11 17:41:41 +01:00
cedd1d7492 zerotier: set interface altname 2024-01-11 15:51:34 +01:00
0429291d40 Merge pull request 'zerotier-members: add ipv6 to list display' (#712) from lassulus-zerotier-list into main 2024-01-11 14:49:28 +00:00
2b75cc4744 zerotier-members: add ipv6 to list display 2024-01-11 15:46:26 +01:00
7bf76eea06 zerotier: use configuration file instead to set the network name 2024-01-11 14:57:00 +01:00
0e62348d72 make zerotier name configureable 2024-01-11 14:57:00 +01:00
398cda65a1 Merge pull request 'zerotier: delete old networks' (#709) from Mic92-zerotier into main 2024-01-11 12:29:09 +00:00
3563b6eaa4 zerotier: delete old networks 2024-01-11 13:24:00 +01:00
1e9032b635 Merge pull request 'meshnamed: mark networkmanager interfaces as unmanaged' (#708) from zerotier into main
Reviewed-on: clan/clan-core#708
2024-01-11 11:47:59 +00:00
a5132a4f81 meshnamed: mark networkmanager interfaces as unmanaged 2024-01-11 12:17:44 +01:00
93fa4e397b Merge pull request 'cmd.py part 3 refactor' (#706) from Qubasa-main into main 2024-01-10 17:57:51 +00:00
359275eee7 Improved error message. Fixed incorrect ret code check in git.py 2024-01-10 18:54:34 +01:00
64846eb395 Fixed bug, where exception is raised where there shouldn't be raised one 2024-01-10 18:46:54 +01:00
b36d0be524 cmd.py part 3 refactor 2024-01-10 18:39:19 +01:00
14f83efcc9 Merge pull request 'open up zerotier ports' (#705) from Mic92-wayland-update into main
Reviewed-on: clan/clan-core#705
2024-01-10 17:24:41 +00:00
7a4b176248 open up zerotier ports 2024-01-10 17:24:41 +00:00
46da9eb5db Merge pull request 'Added ClanCmdError. cmd.run now returns this error' (#704) from Qubasa-main into main 2024-01-10 17:02:08 +00:00
699515ca89 Added ClanCmdError. cmd.run now returns this error 2024-01-10 17:58:39 +01:00
f34df3df02 Merge pull request 'Refactor subprocess to cmd.py part 2' (#685) from Qubasa-main into main 2024-01-10 16:34:38 +00:00
626e5558f3 Fix cmd to default print on all outputs. Default print on stderr 2024-01-10 17:31:11 +01:00
c41bc10325 nix fmt 2024-01-10 17:19:33 +01:00
54f2eba1cc nix fmt 2024-01-10 17:19:12 +01:00
40beda884c Updated cmd.py with Mic92 changes to fit previous changes 2024-01-10 17:18:21 +01:00
0b2439553c Merge pull request 're-anble pulseaudio in qemu' (#703) from Mic92-wayland-update into main 2024-01-10 14:36:25 +00:00
b9613c4801 Merge branch 'main' into Mic92-wayland-update 2024-01-10 14:33:55 +00:00
eeac4902ab re-anble pulseaudio in qemu 2024-01-10 15:32:37 +01:00
ba05589af2 Refactor subprocess to cmd.py part 2 2024-01-10 12:11:29 +01:00
4a69912667 Merge pull request 'state: declare /home as state by default' (#702) from DavHau-main into main 2024-01-10 10:40:36 +00:00
414f475802 state: declare /home as state by default 2024-01-10 17:37:40 +07:00
7266faab4e Merge pull request 'state: move options clanCore.state to a separate file' (#701) from DavHau-main into main 2024-01-10 10:13:13 +00:00
9f8e719b48 state: move options clanCore.state to a separate file 2024-01-10 17:10:10 +07:00
26e9463248 Merge pull request 'cmd: rework redirecting stdout/stderr' (#700) from Mic92-wayland-update into main 2024-01-09 16:39:19 +00:00
fa00bb522b cmd: rework redirecting stdout/stderr 2024-01-09 17:34:43 +01:00
7e1be41843 Merge pull request 'VMs: ensure state dirs don't collide between clans' (#699) from DavHau-main into main 2024-01-09 10:25:39 +00:00
520ff0b334 VMs: ensure state dirs don't collide between clans 2024-01-09 17:22:48 +07:00
2566fccfcf Merge pull request 'VMs: port vm_persistence test to python' (#698) from DavHau-main into main 2024-01-09 07:50:31 +00:00
17390fc392 VMs: port vm_persistence test to python 2024-01-09 14:47:33 +07:00
b272eebc75 Merge pull request 'zerotier-members: print authorized state on list' (#697) from lassulus-member_list_auth into main 2024-01-08 21:32:00 +00:00
c73818c1a5 zerotier-members: print authorized state on list 2024-01-08 22:28:13 +01:00
df5e6761e6 Merge pull request 'VMs: persist state folders on host' (#696) from DavHau-main into main 2024-01-08 11:42:19 +00:00
c29e0086a4 VMs: persist state folders on host
Done:
- move vm inspect attrs from system.clan.vm.config to clanCore.vm.inspect. This gives us proper name and type checking. everything in `system` is basically freeform, so the previous option definitions were never enforced
- when running VMs, mount state directory from ~/.config/clan/vmstate/{...} from the host to /var/vmstate inside the vm
- create bind mount inside the VM from /var/vmstate/{folder} to / for all folders defined in clanCore.state.<name>.folders

TODOs:
- make sure directories in ~/.config/clan/vmstate never collide (include hash of clan-url, etc.)
- port impure test to python
2024-01-08 18:38:07 +07:00
4123944732 Merge pull request 'move selected_vm to the ClanListToolbar constructor' (#690) from Mic92-wayland-update into main 2024-01-04 17:53:02 +00:00
96e2deee1f Merge pull request 'Update start/stop button based on VM state' (#689) from Mic92-wayland-update into main 2024-01-04 17:50:25 +00:00
a5137efd48 move selected_vm to the ClanListToolbar constructor 2024-01-04 18:50:21 +01:00
c7fda31ab3 Update start/stop button based on VM state 2024-01-04 18:47:52 +01:00
738aaa3b5d executor: simplify running_procs 2024-01-04 18:42:13 +01:00
2da5b4a0ff Merge pull request 'reduce number of eval workers' (#688) from Mic92-wayland-update into main 2024-01-04 16:21:16 +00:00
dbfbbf8670 Merge pull request 'clan-vm-manager: make joining clan url more logical' (#687) from Mic92-wayland-update into main 2024-01-04 16:18:29 +00:00
4fc48f38d5 reduce number of eval workers 2024-01-04 17:18:10 +01:00
6a75ea56fd clan-vm-manager: make joining clan url more logical
The icon is confusing. It distracts from the actual "Join" label. Also when a user
copy in an URL we can assume they trust the content, which might be not the case
when they just clicked on an URL.
2024-01-04 17:08:01 +01:00
093566aa42 clan-vm-manager: rename "New" to "Join Clan" 2024-01-04 16:50:19 +01:00
d18c2063c3 clan-vm-manager: rename "Online" to "Status"
online means connected to some network, which is not what this field shows.
2024-01-04 16:49:21 +01:00
bd07d59707 Merge pull request 'strip whitespace from clan uris' (#686) from Mic92-wayland-update into main 2024-01-04 15:34:10 +00:00
d803cec108 Merge pull request 'switch to xwayland display :1' (#683) from Mic92-wayland-update into main 2024-01-04 15:31:10 +00:00
f9dd2e0926 strip whitespace from clan uris 2024-01-04 16:30:26 +01:00
7f21e99736 update nix-direnv 2024-01-04 16:24:26 +01:00
0922856fa5 switch to xwayland display :1
no conflict with Xorg
2024-01-04 16:18:27 +01:00
f526e1261f Merge pull request 'Fix broken executor.py' (#684) from Qubasa-main into main 2024-01-03 12:42:03 +00:00
ae00b3ae65 Fix broken executor.py 2024-01-03 13:26:25 +01:00
8870351737 Merge pull request 'clan_uri: Support all other formats by just differentiating between remote and local' (#680) from Qubasa-main into main 2024-01-02 16:24:51 +00:00
e4a7f68b0e Fixed cmd.py writing to stderr 2024-01-02 17:21:06 +01:00
3f55c688d9 Refactor subprocess to cmd.py part 1. Fixed clan_uri test. 2024-01-02 17:21:06 +01:00
69d08241e9 delete unecessary f.truncate 2024-01-02 17:21:06 +01:00
ef827af89c Fixed unsafe dirs.py urlquoting, improved cmd.py run func 2024-01-02 17:21:06 +01:00
7c5ed85231 clan_uri: Support all other formats by just differentiating between remote and local 2024-01-02 17:21:05 +01:00
4383fab8d7 Merge pull request 'Executor: drop unused in_file' (#682) from Mic92-wayland-update into main 2024-01-02 14:46:25 +00:00
d0b165b311 only set process title on Linux
the systemcall is not portable
2024-01-02 15:44:28 +01:00
c609d84273 Executor: drop unused in_file 2024-01-02 15:44:28 +01:00
7e662b7655 Merge pull request 'drop references to debug.py' (#681) from Mic92-wayland-update into main 2024-01-02 14:26:02 +00:00
0ecfaa96cf drop references to debug.py 2024-01-02 15:22:36 +01:00
c1e449e055 Merge pull request 'Automatic flake update - 2024-01-01T00:00+00:00' (#670) from flake-update-2024-01-01 into main 2024-01-02 14:14:59 +00:00
91633df0c8 Merge pull request 'fix: join workflow' (#677) from hsjobeki-main into main 2024-01-02 09:05:41 +00:00
0676d93e4b
rebase 2024-01-02 10:02:25 +01:00
d6fe6b1d69 Merge pull request 'dirs.py: remove outdated comment' (#676) from DavHau-main into main 2024-01-02 07:29:05 +00:00
e7bd86a9d5 dirs.py: remove outdated comment 2024-01-02 14:25:37 +07:00
3914d61008 Merge pull request 'vm-manager: More error handling' (#675) from Qubasa-main into main 2024-01-02 06:27:30 +00:00
7be42146e7 vm-manager: Added right click context menu 2024-01-02 07:24:30 +01:00
01977b2e2a vm-manager: More error handling 2024-01-02 06:23:55 +01:00
1fc524e53e Merge pull request 'Added show_error_dialogue on exception' (#674) from Qubasa-main into main 2024-01-02 04:57:05 +00:00
c157ecb161 Added show_error_dialogue on exception 2024-01-02 05:54:19 +01:00
6f6fe1c5d4 Merge pull request 'Removed unecessary debug.py and test code' (#672) from Qubasa-main into main 2024-01-01 18:01:16 +00:00
9ec1d594e7 Removed unecessary debug.py and test code 2024-01-01 18:58:12 +01:00
2423597f4e Merge pull request 'history: added vm config to FlakeConfig' (#671) from Qubasa-origin/Qubasa-main-no-flake-update into main 2024-01-01 17:27:48 +00:00
42235e39be Added settings attribute to history file 2024-01-01 18:24:40 +01:00
Clan Merge Bot
7a7954278c update flake lock - 2024-01-01T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/1144887c6f4d2dcbb2316a24364ef53e25b0fcfe' (2023-12-06)
  → 'github:nix-community/disko/0ce1b15b99ac7c280384f136eae00b968f5b3f72' (2023-12-28)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1f8d62a69936dd899d0e7c955537b2f4ca5bc623' (2023-12-10)
  → 'github:NixOS/nixpkgs/eae82ed71467a19374437376fbb7f5e3ad486aeb' (2023-12-31)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/d806e546f96c88cd9f7d91c1c19ebc99ba6277d9' (2023-12-10)
  → 'github:Mic92/sops-nix/cfdbaf68d00bc2f9e071f17ae77be4b27ff72fa6' (2023-12-31)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/afdd5e48a0869b389027307652a658051c0d2f96' (2023-12-10)
  → 'github:numtide/treefmt-nix/2961375283668d867e64129c22af532de8e77734' (2023-12-19)
2024-01-01 00:00:16 +00:00
7069d746ad Added write and read history file functions 2023-12-31 15:17:12 +01:00
e0bba046ea history: added vm config to FlakeConfig 2023-12-31 14:56:03 +01:00
9649e43da5 Merge pull request 'vm-manager: Fixed quit application not working bug' (#668) from Qubasa-main into main 2023-12-31 13:16:16 +00:00
f1642c6c71 vm-manager: Fixed quit application not working bug 2023-12-31 14:13:11 +01:00
ae41eb3ff5 Merge pull request 'cli: fixed run vm not working with url' (#667) from Qubasa-main into main 2023-12-31 13:00:03 +00:00
33afa04b38 cli: fixed run vm not working with url 2023-12-31 13:56:55 +01:00
e247225f6d Merge pull request 'cli: Switched b64 encoding of gcroot names to urlparse' (#666) from Qubasa-main into main 2023-12-31 12:54:29 +00:00
fcadaca010 cli: Switched b64 encoding of gcroot names to urlparse 2023-12-31 13:51:13 +01:00
2db632f1d2 Merge pull request 'Removed unused ui-assets workflow file.' (#665) from Qubasa-main into main 2023-12-30 23:53:14 +00:00
c4799f1e9a Added gcroot for clan Icon and VM 2023-12-31 00:49:57 +01:00
ffea26f1c7 Removed unused ui-assets workflow file. 2023-12-30 23:14:32 +01:00
c05d6f8e35 Merge pull request 'Removed python deal.' (#664) from Qubasa-main into main 2023-12-30 22:13:48 +00:00
330ef00a7c Removed python deal. 2023-12-30 23:10:43 +01:00
b6b0ca7aa0 Merge pull request 'dialog prepare flash usb window' (#663) from hsjobeki-main into main 2023-12-30 10:17:34 +00:00
36e7488da1
prepare flash usb window 2023-12-30 11:14:45 +01:00
269063f868 Merge pull request 'new clan; Join page with none as initial value' (#662) from hsjobeki-main into main 2023-12-30 09:47:01 +00:00
d39d3a9a45
error handling. add: dialog 2023-12-30 10:43:03 +01:00
f5b578d0c7
error handling. add: dialog 2023-12-30 10:41:33 +01:00
a8230e749e Merge pull request 'new clan; Join page with none as initial value' (#661) from hsjobeki-main into main 2023-12-28 13:34:30 +00:00
968adf24b2
new clan; Join page with none as initial value 2023-12-28 14:30:58 +01:00
98020847d4 Merge pull request 'UI: Added process executor. Display vm status correctly in list. | CLI: Added get_qemu_version(), fixed virtio audio bug.' (#660) from Qubasa-main into main 2023-12-26 17:23:35 +00:00
cb06353451 pytest: Removed -s flag for CI 2023-12-26 18:20:41 +01:00
ca265b0c59 UI: Added process executor. Display vm status correctly in list. | CLI: Added get_qemu_version(), fixed virtio audio bug. 2023-12-26 18:02:43 +01:00
4d8c20f284 Merge pull request 'cli/install: add option to specify alternative kexec url' (#659) from Mic92-wayland-update into main 2023-12-26 13:40:29 +00:00
ed643e3829 cli/install: add option to specify alternative kexec url 2023-12-26 14:36:51 +01:00
d73b04bdfa Merge pull request 'qemu-wayland: upgrade to latest 8.2.0 & enable virtio-audio' (#657) from Mic92-wayland-update into main 2023-12-21 14:54:23 +00:00
55f91079c7 rutabaga_gfx_ffi: unstable-2023-12-05 -> unstable-2023-12-20 2023-12-21 15:46:31 +01:00
b6ecb0b2e2 gfxstream: unstable-2023-12-11 -> unstable-2023-12-19 2023-12-21 15:41:57 +01:00
fe60a1a381 aemu: unstable-2023-11-10 -> unstable-2023-08-31 2023-12-21 15:41:21 +01:00
df9aa4ccb2 qemu-wayland: upgrade to latest 8.2.0 2023-12-21 15:40:50 +01:00
de38ce47ee switch to virtio-audio 2023-12-21 15:39:27 +01:00
30e7e06f59 Merge pull request 'clan_vm_manager: Partially working process executor with killpg' (#656) from Qubasa-main into main 2023-12-19 17:05:21 +00:00
a1575ec19c nix fmt 2023-12-19 18:02:06 +01:00
e0e7324876 Improved spawn interface. Added garbage collector 2023-12-19 17:51:43 +01:00
9d877969c9 Fully working executor 2023-12-19 16:44:36 +01:00
baaa860e63 Added proc executor 2023-12-19 16:44:36 +01:00
57bbe19c1a merge 2023-12-19 16:44:36 +01:00
0c33d14ba5 clan_vm_manager: Partially working process executor with killpg 2023-12-19 16:44:36 +01:00
2d71bfbd20 Merge pull request 'modules/syncthing: use generator path' (#655) from a-kenji-syncthing-add-path into main 2023-12-19 13:17:34 +00:00
6cd3a8e58f modules/syncthing: use generator path 2023-12-19 14:14:29 +01:00
fdba3f0c48 Merge pull request 'join window' (#654) from hsjobeki-main into main 2023-12-19 12:58:04 +00:00
784317eb69
join window 2023-12-19 13:39:22 +01:00
284bec3299 Merge pull request 'add installer test' (#653) from lassulus-ssh_test into main 2023-12-18 22:46:18 +00:00
142fe15e80 checks: add test-installation 2023-12-18 23:41:31 +01:00
bbc55743a6 checks backups: remove debug output 2023-12-18 23:41:31 +01:00
a4075510c8 flake: define option for clanInternals
We need this to define test machines in different flake modules
2023-12-18 23:41:31 +01:00
7ff884cd71 Merge pull request 'checks: move ssh_keys to lib/ssh' (#651) from lassulus-ssh_test into main 2023-12-16 21:53:57 +00:00
ae6f3fa7d7 checks: move ssh_keys to lib/ssh 2023-12-16 22:52:18 +01:00
1eec814e4e Merge pull request 'checks: add backup test' (#650) from lassulus-backups_test into main 2023-12-16 21:04:06 +00:00
cc3701f22f checks backup: limit to linux systems 2023-12-16 22:02:36 +01:00
e98f037dd8 clan_cli: remove incorrect clan_flake check 2023-12-16 21:46:19 +01:00
56dafff109 machines build_machine_data: raise ClanError on error 2023-12-16 21:46:19 +01:00
902ccbc90b backups borgbackup: remove dry-run from restore 2023-12-16 21:46:19 +01:00
5c1cf947ab checks: add backup test 2023-12-16 21:46:19 +01:00
d74080f4c7 Merge pull request 'multi window mess' (#649) from hsjobeki-main into main 2023-12-16 14:02:16 +00:00
32f17783dd
add debugging help 2023-12-16 15:00:43 +01:00
218e49770e Merge pull request 'multi window mess' (#648) from hsjobeki-main into main 2023-12-16 13:57:52 +00:00
efc7df3aa7
move list hook 2023-12-16 14:56:20 +01:00
dfe5c250b3
multi window mess 2023-12-16 14:49:45 +01:00
a12fdabf8f Merge pull request 'window switcher' (#647) from hsjobeki-main into main 2023-12-16 12:06:56 +00:00
09cf4a9ff4
fix formatting 2023-12-16 13:05:17 +01:00
e7fa998241
fix typing 2023-12-16 13:04:50 +01:00
89165cc65e
format 2023-12-16 13:03:10 +01:00
d60cfbc0a6
window switcher 2023-12-16 12:52:10 +01:00
590d39a29b Merge pull request 'Automatic flake update - 2023-12-11T00:00+00:00' (#637) from flake-update-2023-12-11 into main 2023-12-15 13:18:21 +00:00
a7d48fefb0 Merge pull request 'add wayland-proxy-virtwl module' (#646) from Mic92-wayland-update into main 2023-12-15 13:15:59 +00:00
9dfc3f9613 add wayland-proxy-virtwl module 2023-12-15 14:14:20 +01:00
8ee72ba5fa clanCore: refactor flake-module.nix into smaller files 2023-12-15 14:14:20 +01:00
fbea4dcaf1 Merge pull request 'use nix-unit from nixpkgs, drop floco from flake inputs' (#645) from Mic92-wayland-update into main 2023-12-15 11:37:43 +00:00
963533e6c1 add wayland-proxy-virtwl fork 2023-12-15 12:36:07 +01:00
bd7cbb331f drop floco from flake inputs 2023-12-15 12:36:07 +01:00
0bdf55b09f use nix-unit from nixpkgs 2023-12-15 12:36:07 +01:00
ad5559974c Merge pull request 'qemu-wayland: add patch to fix vulkaninfo' (#644) from Mic92-wayland-update into main 2023-12-15 11:16:38 +00:00
9caf9a131e qemu-wayland: add patch to fix vulkaninfo 2023-12-15 12:12:46 +01:00
b7bda330b3 Merge pull request 'fixed history allowing adding the same clan twice' (#643) from Qubasa-main into main 2023-12-14 19:59:14 +00:00
5c143bf2da Finished clan history command. Ported remaining async to sync funcs 2023-12-14 20:57:31 +01:00
962a5641b4 fixed history allowing adding the same clan twice 2023-12-14 18:54:00 +01:00
cf899cbee9 Merge pull request 'Moved history to own subcommand' (#638) from Qubasa-main into main 2023-12-14 17:48:32 +00:00
7dc2c21517 Deleted everything webui 2023-12-14 18:47:14 +01:00
1a36ef242f Fixed failing tests in machines and history cli, removed test_machines_api.py 2023-12-14 18:25:42 +01:00
e139628fbd Improved ClanURI 2023-12-14 18:21:10 +01:00
c90053834a Reworked machines list, and history commands 2023-12-14 18:21:10 +01:00
9d952ba534 Fixed pytest 2023-12-14 18:21:10 +01:00
a1ebe663ce Fixing pytest 2023-12-14 18:21:10 +01:00
b00f4554d8 Improved history command 2023-12-14 18:21:10 +01:00
771c0e43ca Moved history to own subcommand 2023-12-14 18:21:10 +01:00
87a8f5518b Merge pull request 'vms/run: remove superfluous command' (#642) from a-kenji-refactor-run into main 2023-12-14 14:54:08 +00:00
8e84f7997a vms/run: remove superfluous command 2023-12-14 15:45:45 +01:00
d678c3ac14 Merge pull request 'vms/run: fix virtual machines spawning multiple windows' (#641) from vms-fix-run into main
Reviewed-on: clan/clan-core#641
2023-12-14 12:01:47 +00:00
Clan Merge Bot
483a21a51b update flake lock - 2023-12-11T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/3cb78c93e6a02f494aaf6aeb37481c27a2e2ee22' (2023-11-25)
  → 'github:nix-community/disko/1144887c6f4d2dcbb2316a24364ef53e25b0fcfe' (2023-12-06)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/150f38bd1e09e20987feacb1b0d5991357532fb5' (2023-09-30)
  → 'github:nix-community/nixos-generators/246219bc21b943c6f6812bb7744218ba0df08600' (2023-12-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0b62f5adfd6635f8013d800ceb0cf39411a8216f' (2023-12-03)
  → 'github:NixOS/nixpkgs/1f8d62a69936dd899d0e7c955537b2f4ca5bc623' (2023-12-10)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/8bca48cb9a12bbd8766f359ad00336924e91b7f7' (2023-12-03)
  → 'github:Mic92/sops-nix/d806e546f96c88cd9f7d91c1c19ebc99ba6277d9' (2023-12-10)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/e82f32aa7f06bbbd56d7b12186d555223dc399d1' (2023-11-12)
  → 'github:numtide/treefmt-nix/afdd5e48a0869b389027307652a658051c0d2f96' (2023-12-10)
2023-12-11 00:00:51 +00:00
588 changed files with 26646 additions and 63996 deletions

12
.envrc
View File

@ -1,5 +1,11 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.5.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.5.1/direnvrc" "sha256-puRzug17Ed4JFS2wbpqa3k764QV6xPP6O3A/ez/JpOM="
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
use flake
watch_file .direnv/selected-shell
if [ -e .direnv/selected-shell ]; then
use flake .#$(cat .direnv/selected-shell)
else
use flake
fi

View File

@ -1,12 +0,0 @@
name: checks-impure
on:
pull_request:
push:
branches: main
jobs:
test:
if: ${{ github.actor != 'ui-asset-bot' }}
runs-on: nix
steps:
- uses: actions/checkout@v3
- run: nix run .#impure-checks

View File

@ -2,11 +2,11 @@ name: checks
on:
pull_request:
push:
branches: main
branches:
- main
jobs:
test:
if: ${{ github.actor != 'ui-asset-bot' }}
checks-impure:
runs-on: nix
steps:
- uses: actions/checkout@v3
- run: nix run --refresh github:Mic92/nix-fast-build -- --no-nom
- run: nix run .#impure-checks

View File

@ -0,0 +1,13 @@
name: deploy
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: nix
steps:
- uses: actions/checkout@v3
- run: nix run .#deploy-docs
env:
SSH_HOMEPAGE_KEY: ${{ secrets.SSH_HOMEPAGE_KEY }}

View File

@ -1,68 +0,0 @@
name: assets1
on:
push:
branches:
- main
jobs:
test:
if: ${{ github.actor != 'ui-asset-bot' }}
runs-on: nix
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v32
with:
fetch-depth: 2
- name: Check if UI files are in the list of modified files
run: |
set -xeuo pipefail
echo "Modified files: $MODIFIED_FILES"
if echo "$MODIFIED_FILES" | grep -q "pkgs/ui/" \
|| echo "$MODIFIED_FILES" | grep -q ".gitea/workflows/ui_assets.yaml"; then
echo "UI files have changed"
./pkgs/ui/nix/update-ui-assets.sh
# git push if we have a diff
if [[ -n $(git diff) ]]; then
DEPS=$(nix shell --inputs-from '.#' "nixpkgs#coreutils-full" -c bash -c "echo \$PATH")
export PATH=$PATH:$DEPS
# Setup git config
git config --global user.email "ui-asset-bot@clan.lol"
git config --global user.name "ui-asset-bot"
################################################
# #
# WARNING: SECRETS ARE BEING PROCESSED HERE. #
# !DO NOT LOG THIS! #
# #
################################################
set +x
AUTH_TOKEN=$(echo -n "x-access-token:$GITEA_TOKEN" | base64)
git config http."$GITHUB_SERVER_URL/".extraheader "AUTHORIZATION: basic $AUTH_TOKEN"
set -x
################################################
# #
# END OF SECRETS AREA #
# #
################################################
# Commit and push
git commit -am "update ui-assets.nix"
echo "Current branch: $GITHUB_REF_NAME"
git push origin HEAD:$GITHUB_REF_NAME
fi
else
echo "No UI files changed. Skipping asset build and push"
fi
env:
MODIFIED_FILES: ${{ steps.changed-files.outputs.modified_files }}
GITEA_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}

18
.gitignore vendored
View File

@ -1,5 +1,6 @@
.direnv
***/.hypothesis
out.log
.coverage.*
**/qubeclan
**/testdir
@ -8,9 +9,12 @@ example_clan
result*
/pkgs/clan-cli/clan_cli/nixpkgs
/pkgs/clan-cli/clan_cli/webui/assets
/machines
nixos.qcow2
**/*.glade~
/docs/out
# dream2nix
.dream2nix
# python
__pycache__
@ -20,3 +24,15 @@ __pycache__
.reports
.ruff_cache
htmlcov
# flatpak
.flatpak-builder
build
build-dir
repo
.env
# node
node_modules
dist
.webui

21
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,21 @@
# Contributing to Clan
## Live-reloading documentation
Enter the `docs` directory:
```shell-session
cd docs
```
Enter the development shell or enable `direnv`:
```shell-session
direnv allow
```
Run a local server:
```shell-session
mkdocs serve
```

View File

@ -1,23 +1,45 @@
# cLAN Core Repository
# Clan Core Repository
Welcome to the cLAN Core Repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo houses all the essential packages, NixOS modules, CLI tools, and tests you need to contribute and work with the cLAN project.
Welcome to the Clan Core Repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users.
## Getting Started
## Why Clan?
If you're new to cLAN and eager to dive in, start with our quickstart guide:
Our mission is simple: to democratize computing by providing tools that empower users, foster innovation, and challenge outdated paradigms. Clan represents our contribution to a future where technology serves humanity, not the other way around. By participating in Clan, you're joining a movement dedicated to creating a secure, user-empowered digital future.
- **Quickstart Guide**: Check out [quickstart.md](docs/quickstart.md) to get up and running with cLAN in no time.
## Features of Clan
## Managing Secrets
- **Full-Stack System Deployment:** Utilize Clans toolkit alongside Nix's reliability to build and manage systems effortlessly.
- **Overlay Networks:** Secure, private communication channels between devices.
- **Virtual Machine Integration:** Seamless operation of VM applications within the main operating system.
- **Robust Backup Management:** Long-term, self-hosted data preservation.
- **Intuitive Secret Management:** Simplified encryption and password management processes.
Security is paramount, and cLAN provides guidelines for handling secrets effectively:
## Getting Started with Clan
- **Secrets Management**: Learn how to manage secrets securely by reading [secrets-management.md](docs/secrets-management.md).
If you're new to Clan and eager to dive in, start with our quickstart guide and explore the core functionalities that Clan offers:
## Contributing to cLAN
- **Quickstart Guide**: Check out [getting started](https://docs.clan.lol/#starting-with-a-new-clan-project)<!-- [docs/site/index.md](docs/site/index.md) --> to get up and running with Clan in no time.
We welcome contributions from the community, and we've prepared a comprehensive guide to help you get started:
### Managing Secrets
- **Contribution Guidelines**: Find out how to contribute and make a meaningful impact on the cLAN project by reading [contributing.md](docs/contributing.md).
In the Clan ecosystem, security is paramount. Learn how to handle secrets effectively:
- **Secrets Management**: Securely manage secrets by consulting [secrets](https://docs.clan.lol/getting-started/secrets/)<!-- [secrets.md](docs/site/getting-started/secrets.md) -->.
### Contributing to Clan
The Clan project thrives on community contributions. We welcome everyone to contribute and collaborate:
- **Contribution Guidelines**: Make a meaningful impact by following the steps in [contributing](https://docs.clan.lol/contributing/contributing/)<!-- [contributing.md](docs/CONTRIBUTING.md) -->.
## Join the Revolution
Clan is more than a tool; it's a movement towards a better digital future. By contributing to the Clan project, you're part of changing technology for the better, together.
### Community and Support
Connect with us and the Clan community for support and discussion:
- [Matrix channel](https://matrix.to/#/#clan:lassul.us) for live discussions.
- IRC bridges (coming soon) for real-time chat support.
Whether you're a newcomer or a seasoned developer, we look forward to your contributions and collaboration on the cLAN project. Let's build amazing things together!

View File

@ -0,0 +1,178 @@
{ self, ... }:
{
clan.machines.test-backup = {
imports = [ self.nixosModules.test-backup ];
fileSystems."/".device = "/dev/null";
boot.loader.grub.device = "/dev/null";
};
flake.nixosModules = {
test-backup =
{
pkgs,
lib,
config,
...
}:
let
dependencies = [
self
pkgs.stdenv.drvPath
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-backup.config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
imports = [
self.clanModules.borgbackup
self.clanModules.localbackup
self.clanModules.sshd
];
clan.networking.targetHost = "machine";
networking.hostName = "machine";
services.openssh.settings.UseDns = false;
programs.ssh.knownHosts = {
machine.hostNames = [ "machine" ];
machine.publicKey = builtins.readFile ../lib/ssh/pubkey;
};
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
systemd.tmpfiles.settings."vmsecrets" = {
"/root/.ssh/id_ed25519" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/ssh.id_ed25519" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
user = "root";
};
};
};
clanCore.facts.secretStore = "vm";
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli
(pkgs.writeShellScriptBin "pre-restore-command" ''
touch /var/test-service/pre-restore-command
'')
(pkgs.writeShellScriptBin "post-restore-command" ''
touch /var/test-service/post-restore-command
'')
];
environment.etc.install-closure.source = "${closureInfo}/store-paths";
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
};
system.extraDependencies = dependencies;
clanCore.state.test-backups.folders = [ "/var/test-backups" ];
clanCore.state.test-service = {
preRestoreCommand = "pre-restore-command";
postRestoreCommand = "post-restore-command";
folders = [ "/var/test-service" ];
};
clan.borgbackup.destinations.test-backup.repo = "borg@machine:.";
fileSystems."/mnt/external-disk" = {
device = "/dev/vdb"; # created in tests with virtualisation.emptyDisks
autoFormat = true;
fsType = "ext4";
options = [
"defaults"
"noauto"
];
};
clan.localbackup.targets.hdd = {
directory = "/mnt/external-disk";
preMountHook = ''
touch /run/mount-external-disk
'';
postUnmountHook = ''
touch /run/unmount-external-disk
'';
};
services.borgbackup.repos.test-backups = {
path = "/var/lib/borgbackup/test-backups";
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
};
};
};
perSystem =
{ nodes, pkgs, ... }:
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
test-backups = (import ../lib/test-base.nix) {
name = "test-backups";
nodes.machine = {
imports = [
self.nixosModules.clanCore
self.nixosModules.test-backup
];
virtualisation.emptyDiskImages = [ 256 ];
};
testScript = ''
import json
start_all()
# dummy data
machine.succeed("mkdir -p /var/test-backups /var/test-service")
machine.succeed("echo testing > /var/test-backups/somefile")
# create
machine.succeed("clan backups create --debug --flake ${self} test-backup")
machine.wait_until_succeeds("! systemctl is-active borgbackup-job-test-backup >&2")
machine.succeed("test -f /run/mount-external-disk")
machine.succeed("test -f /run/unmount-external-disk")
# list
backup_id = json.loads(machine.succeed("borg-job-test-backup list --json"))["archives"][0]["archive"]
out = machine.succeed("clan backups list --debug --flake ${self} test-backup").strip()
print(out)
assert backup_id in out, f"backup {backup_id} not found in {out}"
localbackup_id = "hdd::/mnt/external-disk/snapshot.0"
assert localbackup_id in out, "localbackup not found in {out}"
## borgbackup restore
machine.succeed("rm -f /var/test-backups/somefile")
machine.succeed(f"clan backups restore --debug --flake ${self} test-backup borgbackup 'test-backup::borg@machine:.::{backup_id}' >&2")
assert machine.succeed("cat /var/test-backups/somefile").strip() == "testing", "restore failed"
machine.succeed("test -f /var/test-service/pre-restore-command")
machine.succeed("test -f /var/test-service/post-restore-command")
## localbackup restore
machine.succeed("rm -f /var/test-backups/somefile /var/test-service/{pre,post}-restore-command")
machine.succeed(f"clan backups restore --debug --flake ${self} test-backup localbackup '{localbackup_id}' >&2")
assert machine.succeed("cat /var/test-backups/somefile").strip() == "testing", "restore failed"
machine.succeed("test -f /var/test-service/pre-restore-command")
machine.succeed("test -f /var/test-service/post-restore-command")
'';
} { inherit pkgs self; };
};
};
}

View File

@ -1,36 +1,51 @@
(import ../lib/container-test.nix) ({ ... }: {
name = "borgbackup";
(import ../lib/test-base.nix) (
{ ... }:
{
name = "borgbackup";
nodes.machine = { self, ... }: {
imports = [
self.clanModules.borgbackup
self.nixosModules.clanCore
nodes.machine =
{ self, pkgs, ... }:
{
services.openssh.enable = true;
services.borgbackup.repos.testrepo = {
authorizedKeys = [
(builtins.readFile ./borg_test.pub)
];
};
}
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clanCore.state.testState.folders = [ "/etc/state" ];
environment.etc.state.text = "hello world";
clan.borgbackup = {
enable = true;
destinations.test = {
repo = "borg@localhost:.";
rsh = "ssh -i ${./borg_test} -o StrictHostKeyChecking=no";
};
};
}
];
};
testScript = ''
start_all()
machine.systemctl("start --wait borgbackup-job-test.service")
assert "machine-test" in machine.succeed("BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes /run/current-system/sw/bin/borg-job-test list")
'';
})
imports = [
self.clanModules.borgbackup
self.nixosModules.clanCore
{
services.openssh.enable = true;
services.borgbackup.repos.testrepo = {
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
};
}
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clanCore.state.testState.folders = [ "/etc/state" ];
environment.etc.state.text = "hello world";
systemd.tmpfiles.settings."vmsecrets" = {
"/etc/secrets/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
user = "root";
};
};
};
clanCore.facts.secretStore = "vm";
clan.borgbackup.destinations.test.repo = "borg@localhost:.";
}
];
};
testScript = ''
start_all()
machine.systemctl("start --wait borgbackup-job-test.service")
assert "machine-test" in machine.succeed("BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes /run/current-system/sw/bin/borg-job-test list")
'';
}
)

View File

@ -1,14 +1,19 @@
(import ../lib/container-test.nix) ({ ... }: {
name = "secrets";
(import ../lib/container-test.nix) (
{ ... }:
{
name = "secrets";
nodes.machine = { ... }: {
networking.hostName = "machine";
services.openssh.enable = true;
services.openssh.startWhenNeeded = false;
};
testScript = ''
start_all()
machine.succeed("systemctl status sshd")
machine.wait_for_unit("sshd")
'';
})
nodes.machine =
{ ... }:
{
networking.hostName = "machine";
services.openssh.enable = true;
services.openssh.startWhenNeeded = false;
};
testScript = ''
start_all()
machine.succeed("systemctl status sshd")
machine.wait_for_unit("sshd")
'';
}
)

View File

@ -1,24 +1,29 @@
(import ../lib/container-test.nix) ({ pkgs, ... }: {
name = "secrets";
(import ../lib/container-test.nix) (
{ pkgs, ... }:
{
name = "secrets";
nodes.machine = { self, ... }: {
imports = [
self.clanModules.deltachat
self.nixosModules.clanCore
nodes.machine =
{ self, ... }:
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("maddy")
# imap
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 143")
# smtp submission
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 587")
# smtp
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 25")
'';
})
imports = [
self.clanModules.deltachat
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("maddy")
# imap
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 143")
# smtp submission
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 587")
# smtp
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 25")
'';
}
)

View File

@ -1,50 +1,78 @@
{ self, ... }: {
{ self, ... }:
{
imports = [
./impure/flake-module.nix
./backups/flake-module.nix
./installation/flake-module.nix
./flash/flake-module.nix
];
perSystem = { pkgs, lib, self', ... }: {
checks =
let
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
# this gives us a reference to our flake but also all flake inputs
inherit self;
};
nixosTests = lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
deltachat = import ./deltachat nixosTestArgs;
meshnamed = import ./meshnamed nixosTestArgs;
borgbackup = import ./borgbackup nixosTestArgs;
syncthing = import ./syncthing nixosTestArgs;
};
schemaTests = pkgs.callPackages ./schemas.nix {
inherit self;
};
flakeOutputs = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) self.nixosConfigurations
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages
// lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells
// lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) (self'.legacyPackages.homeConfigurations or { });
in
nixosTests // schemaTests // flakeOutputs;
legacyPackages = {
nixosTests =
perSystem =
{
pkgs,
lib,
self',
...
}:
{
checks =
let
# ensure all options can be rendered after importing clan into nixos
renderClanOptions =
let
docs = pkgs.nixosOptionsDoc {
options =
(pkgs.nixos {
imports = [ self.nixosModules.clanCore ];
clanCore.clanDir = ./.;
}).options;
warningsAreErrors = false;
};
in
docs.optionsJSON;
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
# this gives us a reference to our flake but also all flake inputs
inherit self;
};
nixosTests = lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
deltachat = import ./deltachat nixosTestArgs;
matrix-synapse = import ./matrix-synapse nixosTestArgs;
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
borgbackup = import ./borgbackup nixosTestArgs;
syncthing = import ./syncthing nixosTestArgs;
wayland-proxy-virtwl = import ./wayland-proxy-virtwl nixosTestArgs;
};
flakeOutputs =
lib.mapAttrs' (
name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
) self.nixosConfigurations
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages
// lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells
// lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) (
self'.legacyPackages.homeConfigurations or { }
);
in
lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
};
{ inherit renderClanOptions; } // nixosTests // flakeOutputs;
legacyPackages = {
nixosTests =
let
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
# this gives us a reference to our flake but also all flake inputs
inherit self;
};
in
lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
};
};
};
};
}

View File

@ -0,0 +1,50 @@
{ self, ... }:
{
perSystem =
{
nodes,
pkgs,
lib,
...
}:
let
dependencies = [
pkgs.disko
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.toplevel
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.build.diskoScript.drvPath
self.clanInternals.machines.${pkgs.hostPlatform.system}.test_install_machine.config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
# Currently disabled...
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
flash = (import ../lib/test-base.nix) {
name = "flash";
nodes.target = {
virtualisation.emptyDiskImages = [ 4096 ];
virtualisation.memorySize = 3000;
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
environment.etc."install-closure".source = "${closureInfo}/store-paths";
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
};
testScript = ''
start_all()
machine.succeed("clan flash --debug --flake ${../..} --yes --disk main /dev/vdb test_install_machine")
'';
} { inherit pkgs self; };
};
};
}

View File

@ -1,66 +1,24 @@
{ ... }: {
perSystem = { pkgs, lib, ... }: {
packages = rec {
{
perSystem =
{ pkgs, lib, ... }:
{
# a script that executes all other checks
impure-checks = pkgs.writeShellScriptBin "impure-checks" ''
packages.impure-checks = pkgs.writeShellScriptBin "impure-checks" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
export PATH="${lib.makeBinPath [
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
]}"
unset CLAN_DIR
export PATH="${
lib.makeBinPath [
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
]
}"
ROOT=$(git rev-parse --show-toplevel)
cd "$ROOT/pkgs/clan-cli"
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -m impure -s ./tests $@"
'';
runMockApi = pkgs.writeShellScriptBin "run-mock-api" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
export PATH="${lib.makeBinPath [
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
pkgs.coreutils
pkgs.procps
]}"
ROOT=$(git rev-parse --show-toplevel)
cd "$ROOT/pkgs/clan-cli"
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp clan webui --no-open --port 5757'
'';
runSchemaTests = pkgs.writeShellScriptBin "runSchemaTests" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
${runMockApi}/bin/run-mock-api &
MOCK_API_PID=$!
echo "Started mock api with pid $MOCK_API_PID"
function cleanup {
echo "Stopping server..."
pkill -9 -f "python -m clan webui --no-open --port 5757"
}
trap cleanup EXIT
export PATH="${lib.makeBinPath [
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
pkgs.procps
pkgs.coreutils
]}"
sleep 3
ROOT=$(git rev-parse --show-toplevel)
cd "$ROOT/pkgs/clan-cli"
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st auth login RHtr8nLtz77tqRP8yUGyf-Flv_9SLI'
nix develop "$ROOT#clan-cli" -c bash -c 'TMPDIR=/tmp st run http://localhost:5757/openapi.json --experimental=openapi-3.1 --report --workers 8 --max-response-time=50 --request-timeout=1000 -M GET'
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -s -m impure ./tests $@"
'';
};
};
}

View File

@ -0,0 +1,114 @@
{ self, lib, ... }:
{
clan.machines.test_install_machine = {
clan.networking.targetHost = "test_install_machine";
fileSystems."/".device = lib.mkDefault "/dev/vdb";
boot.loader.grub.device = lib.mkDefault "/dev/vdb";
imports = [ self.nixosModules.test_install_machine ];
};
flake.nixosModules = {
test_install_machine =
{ lib, modulesPath, ... }:
{
imports = [
self.clanModules.disk-layouts
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
];
clan.disk-layouts.singleDiskExt4.device = "/dev/vdb";
environment.etc."install-successful".text = "ok";
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
};
};
perSystem =
{
nodes,
pkgs,
lib,
...
}:
let
dependencies = [
self
self.nixosConfigurations.test_install_machine.config.system.build.toplevel
self.nixosConfigurations.test_install_machine.config.system.build.diskoScript
self.nixosConfigurations.test_install_machine.config.system.clan.deployment.file
pkgs.stdenv.drvPath
pkgs.nixos-anywhere
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
test-installation = (import ../lib/test-base.nix) {
name = "test-installation";
nodes.target = {
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
system.nixos.variant_id = "installer";
virtualisation.emptyDiskImages = [ 4096 ];
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
};
nodes.client = {
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.memorySize = 2048;
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
system.extraDependencies = dependencies;
};
testScript = ''
def create_test_machine(oldmachine=None, args={}): # taken from <nixpkgs/nixos/tests/installer.nix>
startCommand = "${pkgs.qemu_test}/bin/qemu-kvm"
startCommand += " -cpu max -m 1024 -virtfs local,path=/nix/store,security_model=none,mount_tag=nix-store"
startCommand += f' -drive file={oldmachine.state_dir}/empty0.qcow2,id=drive1,if=none,index=1,werror=report'
startCommand += ' -device virtio-blk-pci,drive=drive1'
machine = create_machine({
"startCommand": startCommand,
} | args)
driver.machines.append(machine)
return machine
start_all()
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("ssh -o StrictHostKeyChecking=accept-new -v root@target hostname")
client.succeed("clan machines install --debug --flake ${../..} --yes test_install_machine root@target >&2")
try:
target.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
new_machine = create_test_machine(oldmachine=target, args={ "name": "new_machine" })
assert(new_machine.succeed("cat /etc/install-successful").strip() == "ok")
'';
} { inherit pkgs self; };
};
};
}

View File

@ -1,17 +1,23 @@
{ hostPkgs, lib, config, ... }:
{
hostPkgs,
lib,
config,
...
}:
let
testDriver = hostPkgs.python3.pkgs.callPackage ./package.nix {
inherit (config) extraPythonPackages;
inherit (hostPkgs.pkgs) util-linux systemd;
};
containers = map (m: m.system.build.toplevel) (lib.attrValues config.nodes);
pythonizeName = name:
pythonizeName =
name:
let
head = lib.substring 0 1 name;
tail = lib.substring 1 (-1) name;
in
(if builtins.match "[A-z_]" head == null then "_" else head) +
lib.stringAsChars (c: if builtins.match "[A-z0-9_]" c == null then "_" else c) tail;
(if builtins.match "[A-z_]" head == null then "_" else head)
+ lib.stringAsChars (c: if builtins.match "[A-z0-9_]" c == null then "_" else c) tail;
nodeHostNames =
let
nodesList = map (c: c.system.name) (lib.attrValues config.nodes);
@ -21,68 +27,72 @@ let
pythonizedNames = map pythonizeName nodeHostNames;
in
{
driver = lib.mkForce (hostPkgs.runCommand "nixos-test-driver-${config.name}"
{
nativeBuildInputs = [
hostPkgs.makeWrapper
] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ];
buildInputs = [ testDriver ];
testScript = config.testScriptString;
preferLocalBuild = true;
passthru = config.passthru;
meta = config.meta // {
mainProgram = "nixos-test-driver";
driver = lib.mkForce (
hostPkgs.runCommand "nixos-test-driver-${config.name}"
{
nativeBuildInputs = [
hostPkgs.makeWrapper
] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ];
buildInputs = [ testDriver ];
testScript = config.testScriptString;
preferLocalBuild = true;
passthru = config.passthru;
meta = config.meta // {
mainProgram = "nixos-test-driver";
};
}
''
mkdir -p $out/bin
containers=(${toString containers})
${lib.optionalString (!config.skipTypeCheck) ''
# prepend type hints so the test script can be type checked with mypy
cat "${./test-script-prepend.py}" >> testScriptWithTypes
echo "${builtins.toString machineNames}" >> testScriptWithTypes
echo -n "$testScript" >> testScriptWithTypes
echo "Running type check (enable/disable: config.skipTypeCheck)"
echo "See https://nixos.org/manual/nixos/stable/#test-opt-skipTypeCheck"
mypy --no-implicit-optional \
--pretty \
--no-color-output \
testScriptWithTypes
''}
echo -n "$testScript" >> $out/test-script
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-test-driver
wrapProgram $out/bin/nixos-test-driver \
${lib.concatStringsSep " " (map (name: "--add-flags '--container ${name}'") containers)} \
--add-flags "--test-script '$out/test-script'"
''
);
test = lib.mkForce (
lib.lazyDerivation {
# lazyDerivation improves performance when only passthru items and/or meta are used.
derivation = hostPkgs.stdenv.mkDerivation {
name = "vm-test-run-${config.name}";
requiredSystemFeatures = [ "uid-range" ];
buildCommand = ''
mkdir -p $out
# effectively mute the XMLLogger
export LOGFILE=/dev/null
${config.driver}/bin/nixos-test-driver -o $out
'';
passthru = config.passthru;
meta = config.meta;
};
inherit (config) passthru meta;
}
''
mkdir -p $out/bin
containers=(${toString containers})
${lib.optionalString (!config.skipTypeCheck) ''
# prepend type hints so the test script can be type checked with mypy
cat "${./test-script-prepend.py}" >> testScriptWithTypes
echo "${builtins.toString machineNames}" >> testScriptWithTypes
echo -n "$testScript" >> testScriptWithTypes
echo "Running type check (enable/disable: config.skipTypeCheck)"
echo "See https://nixos.org/manual/nixos/stable/#test-opt-skipTypeCheck"
mypy --no-implicit-optional \
--pretty \
--no-color-output \
testScriptWithTypes
''}
echo -n "$testScript" >> $out/test-script
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-test-driver
wrapProgram $out/bin/nixos-test-driver \
${lib.concatStringsSep " " (map (name: "--add-flags '--container ${name}'") containers)} \
--add-flags "--test-script '$out/test-script'"
'');
test = lib.mkForce (lib.lazyDerivation {
# lazyDerivation improves performance when only passthru items and/or meta are used.
derivation = hostPkgs.stdenv.mkDerivation {
name = "vm-test-run-${config.name}";
requiredSystemFeatures = [ "uid-range" ];
buildCommand = ''
mkdir -p $out
# effectively mute the XMLLogger
export LOGFILE=/dev/null
${config.driver}/bin/nixos-test-driver -o $out
'';
passthru = config.passthru;
meta = config.meta;
};
inherit (config) passthru meta;
});
);
}

View File

@ -1,8 +1,18 @@
{ extraPythonPackages, python3Packages, buildPythonApplication, setuptools, util-linux, systemd }:
{
extraPythonPackages,
python3Packages,
buildPythonApplication,
setuptools,
util-linux,
systemd,
}:
buildPythonApplication {
pname = "test-driver";
version = "0.0.1";
propagatedBuildInputs = [ util-linux systemd ] ++ extraPythonPackages python3Packages;
propagatedBuildInputs = [
util-linux
systemd
] ++ extraPythonPackages python3Packages;
nativeBuildInputs = [ setuptools ];
format = "pyproject";
src = ./.;

View File

@ -19,8 +19,8 @@ test_driver = ["py.typed"]
target-version = "py311"
line-length = 88
select = [ "E", "F", "I", "U", "N", "RUF", "ANN", "A" ]
ignore = ["E501", "ANN101", "ANN401", "A003"]
lint.select = [ "E", "F", "I", "U", "N", "RUF", "ANN", "A" ]
lint.ignore = ["E501", "ANN101", "ANN401", "A003"]
[tool.mypy]
python_version = "3.11"

View File

@ -258,7 +258,7 @@ class Driver:
self.machines = []
for container in containers:
name_match = re.match(r".*-nixos-system-(.+)-\d.+", container.name)
name_match = re.match(r".*-nixos-system-(.+)-(.+)", container.name)
if not name_match:
raise ValueError(f"Unable to extract hostname from {container.name}")
name = name_match.group(1)

View File

@ -1,33 +1,34 @@
test:
{ pkgs
, self
, ...
}:
{ pkgs, self, ... }:
let
inherit (pkgs) lib;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest ({ hostPkgs, ... }: {
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
documentation.enable = lib.mkDefault false;
boot.isContainer = true;
(nixos-lib.runTest (
{ hostPkgs, ... }:
{
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
nix.package = pkgs.nixVersions.latest;
documentation.enable = lib.mkDefault false;
boot.isContainer = true;
# undo qemu stuff
system.build.initialRamdisk = "";
virtualisation.sharedDirectories = lib.mkForce { };
networking.useDHCP = false;
# undo qemu stuff
system.build.initialRamdisk = "";
virtualisation.sharedDirectories = lib.mkForce { };
networking.useDHCP = false;
# we have not private networking so far
networking.interfaces = lib.mkForce { };
#networking.primaryIPAddress = lib.mkForce null;
systemd.services.backdoor.enable = false;
};
# to accept external dependencies such as disko
node.specialArgs.self = self;
imports = [
test
./container-driver/module.nix
];
})).config.result
# we have not private networking so far
networking.interfaces = lib.mkForce { };
#networking.primaryIPAddress = lib.mkForce null;
systemd.services.backdoor.enable = false;
};
# to accept external dependencies such as disko
node.specialArgs.self = self;
imports = [
test
./container-driver/module.nix
];
}
)).config.result

View File

@ -1,8 +1,5 @@
test:
{ pkgs
, self
, ...
}:
{ pkgs, self, ... }:
let
inherit (pkgs) lib;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
@ -10,9 +7,13 @@ in
(nixos-lib.runTest {
hostPkgs = pkgs;
# speed-up evaluation
defaults.documentation.enable = lib.mkDefault false;
defaults = {
documentation.enable = lib.mkDefault false;
nix.settings.min-free = 0;
nix.package = pkgs.nixVersions.latest;
};
# to accept external dependencies such as disko
node.specialArgs.self = self;
imports = [ test ];
}).config.result

View File

@ -0,0 +1,37 @@
(import ../lib/container-test.nix) (
{ pkgs, ... }:
{
name = "matrix-synapse";
nodes.machine =
{ self, lib, ... }:
{
imports = [
self.clanModules.matrix-synapse
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clan.matrix-synapse = {
enable = true;
domain = "clan.test";
};
}
{
# secret override
clanCore.facts.services.matrix-synapse.secret.synapse-registration_shared_secret.path = "${./synapse-registration_shared_secret}";
services.nginx.virtualHosts."matrix.clan.test" = {
enableACME = lib.mkForce false;
forceSSL = lib.mkForce false;
};
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("matrix-synapse")
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 8008")
machine.succeed("${pkgs.curl}/bin/curl -Ssf -L http://localhost/_matrix/static/ -H 'Host: matrix.clan.test'")
'';
}
)

View File

@ -0,0 +1 @@
registration_shared_secret: supersecret

View File

@ -1,21 +0,0 @@
(import ../lib/container-test.nix) ({ pkgs, ... }: {
name = "meshnamed";
nodes.machine = { self, ... }: {
imports = [
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clan.networking.meshnamed.networks.vpn.subnet = "fd43:7def:4b50:28d0:4e99:9347:3035:17ef/88";
clanCore.clanDir = ./.;
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("meshnamed")
out = machine.succeed("${pkgs.dnsutils}/bin/dig AAAA foo.7vbx332lkaunatuzsndtanix54.vpn @meshnamed +short")
print(out)
assert out.strip() == "fd43:7def:4b50:28d0:4e99:9347:3035:17ef"
'';
})

View File

@ -1,54 +0,0 @@
{ self, lib, inputs, ... }:
let
inherit (builtins)
mapAttrs
toJSON
toFile
;
inherit (lib)
mapAttrs'
;
clanLib = self.lib;
clanModules = self.clanModules;
in
{
perSystem = { pkgs, ... }:
let
baseModule = {
imports =
(import (inputs.nixpkgs + "/nixos/modules/module-list.nix"))
++ [{
nixpkgs.hostPlatform = pkgs.system;
}];
};
optionsFromModule = module:
let
evaled = lib.evalModules {
modules = [ module baseModule ];
};
in
evaled.options.clan.networking;
clanModuleSchemas =
mapAttrs
(_: module: clanLib.jsonschema.parseOptions (optionsFromModule module))
clanModules;
mkTest = name: schema: pkgs.runCommand "schema-${name}" { } ''
${pkgs.check-jsonschema}/bin/check-jsonschema \
--check-metaschema ${toFile "schema-${name}" (toJSON schema)}
touch $out
'';
in
{
checks = mapAttrs'
(name: schema: {
name = "schema-${name}";
value = mkTest name schema;
})
clanModuleSchemas;
};
}

View File

@ -1,34 +0,0 @@
{ self, runCommand, check-jsonschema, pkgs, lib, ... }:
let
clanModules.clanCore = self.nixosModules.clanCore;
baseModule = {
imports =
(import (pkgs.path + "/nixos/modules/module-list.nix"))
++ [{
nixpkgs.hostPlatform = "x86_64-linux";
}];
};
optionsFromModule = module:
let
evaled = lib.evalModules {
modules = [ module baseModule ];
};
in
evaled.options.clan;
clanModuleSchemas = lib.mapAttrs (_: module: self.lib.jsonschema.parseOptions (optionsFromModule module)) clanModules;
mkTest = name: schema: runCommand "schema-${name}" { } ''
${check-jsonschema}/bin/check-jsonschema \
--check-metaschema ${builtins.toFile "schema-${name}" (builtins.toJSON schema)}
touch $out
'';
in
lib.mapAttrs'
(name: schema: {
name = "schema-${name}";
value = mkTest name schema;
})
clanModuleSchemas

View File

@ -1,19 +1,20 @@
(import ../lib/test-base.nix) {
name = "secrets";
nodes.machine = { self, config, ... }: {
imports = [
(self.nixosModules.clanCore)
];
environment.etc."secret".source = config.sops.secrets.secret.path;
environment.etc."group-secret".source = config.sops.secrets.group-secret.path;
sops.age.keyFile = ./key.age;
nodes.machine =
{ self, config, ... }:
{
environment.etc."privkey.age".source = ./key.age;
imports = [ (self.nixosModules.clanCore) ];
environment.etc."secret".source = config.sops.secrets.secret.path;
environment.etc."group-secret".source = config.sops.secrets.group-secret.path;
sops.age.keyFile = "/etc/privkey.age";
clanCore.clanDir = "${./.}";
clanCore.machineName = "machine";
clanCore.clanDir = "${./.}";
clanCore.machineName = "machine";
networking.hostName = "machine";
};
networking.hostName = "machine";
};
testScript = ''
machine.succeed("cat /etc/secret >&2")
machine.succeed("cat /etc/group-secret >&2")

View File

@ -19,7 +19,7 @@
"syncthing.key".source = ./introducer/introducer_test_key;
"syncthing.api".source = ./introducer/introducer_test_api;
};
clanCore.secrets.syncthing.secrets."syncthing.api".path = "/etc/syncthing.api";
clanCore.facts.services.syncthing.secret."syncthing.api".path = "/etc/syncthing.api";
services.syncthing.cert = "/etc/syncthing.pam";
services.syncthing.key = "/etc/syncthing.key";
# Doesn't test zerotier!

View File

@ -0,0 +1,35 @@
import ../lib/test-base.nix (
{
config,
pkgs,
lib,
...
}:
{
name = "wayland-proxy-virtwl";
nodes.machine =
{ self, ... }:
{
imports = [
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
services.wayland-proxy-virtwl.enable = true;
virtualisation.qemu.options = [
"-vga none -device virtio-gpu-rutabaga,cross-domain=on,hostmem=4G,wsi=headless"
];
virtualisation.qemu.package = lib.mkForce pkgs.qemu_kvm;
};
testScript = ''
start_all()
# use machinectl
machine.succeed("machinectl shell .host ${config.nodes.machine.systemd.package}/bin/systemctl --user start wayland-proxy-virtwl >&2")
'';
}
)

View File

@ -0,0 +1,25 @@
(import ../lib/container-test.nix) (
{ pkgs, ... }:
{
name = "zt-tcp-relay";
nodes.machine =
{ self, ... }:
{
imports = [
self.nixosModules.clanCore
self.clanModules.zt-tcp-relay
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
}
];
};
testScript = ''
start_all()
machine.wait_for_unit("zt-tcp-relay.service")
out = machine.succeed("${pkgs.netcat}/bin/nc -z -v localhost 4443")
print(out)
'';
}
)

View File

@ -1,90 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.clan.borgbackup;
in
{
options.clan.borgbackup = {
enable = lib.mkEnableOption "backups with borgbackup";
destinations = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: {
options = {
name = lib.mkOption {
type = lib.types.str;
default = name;
description = "the name of the backup job";
};
repo = lib.mkOption {
type = lib.types.str;
description = "the borgbackup repository to backup to";
};
rsh = lib.mkOption {
type = lib.types.str;
default = "ssh -i ${config.clanCore.secrets.borgbackup.secrets."borgbackup.ssh".path} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
description = "the rsh to use for the backup";
};
};
}));
description = ''
destinations where the machine should be backuped to
'';
};
};
config = lib.mkIf cfg.enable {
services.borgbackup.jobs = lib.mapAttrs
(_: dest: {
paths = lib.flatten (map (state: state.folders) (lib.attrValues config.clanCore.state));
exclude = [
"*.pyc"
];
repo = dest.repo;
environment.BORG_RSH = dest.rsh;
encryption.mode = "none";
compression = "auto,zstd";
startAt = "*-*-* 01:00:00";
preHook = ''
set -x
'';
prune.keep = {
within = "1d"; # Keep all archives from the last day
daily = 7;
weekly = 4;
monthly = 0;
};
})
cfg.destinations;
clanCore.secrets.borgbackup = {
facts."borgbackup.ssh.pub" = { };
secrets."borgbackup.ssh" = { };
generator.path = [ pkgs.openssh pkgs.coreutils ];
generator.script = ''
ssh-keygen -t ed25519 -N "" -f "$secrets"/borgbackup.ssh
mv "$secrets"/borgbackup.ssh.pub "$facts"/borgbackup.ssh.pub
'';
};
clanCore.backups.providers.borgbackup = {
# TODO list needs to run locally or on the remote machine
list = ''
${lib.concatMapStringsSep "\n" (dest: ''
# we need yes here to skip the changed url verification
yes y | borg-job-${dest.name} list --json | jq -r '. + {"job-name": "${dest.name}"}'
'') (lib.attrValues cfg.destinations)}
'';
create = ''
${lib.concatMapStringsSep "\n" (dest: ''
systemctl start borgbackup-job-${dest.name}
'') (lib.attrValues cfg.destinations)}
'';
restore = ''
set -efu
cd /
IFS=';' read -ra FOLDER <<< "$FOLDERS"
yes y | borg-job-"$JOB" extract --list --dry-run "$LOCATION"::"$ARCHIVE_ID" "''${FOLDER[@]}"
'';
};
};
}

View File

@ -0,0 +1,2 @@
Efficient, deduplicating backup program with optional compression and secure encryption.
---

View File

@ -0,0 +1,131 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.clan.borgbackup;
in
{
options.clan.borgbackup.destinations = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.strMatching "^[a-zA-Z0-9._-]+$";
default = name;
description = "the name of the backup job";
};
repo = lib.mkOption {
type = lib.types.str;
description = "the borgbackup repository to backup to";
};
rsh = lib.mkOption {
type = lib.types.str;
default = "ssh -i ${
config.clanCore.facts.services.borgbackup.secret."borgbackup.ssh".path
} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
defaultText = "ssh -i \${config.clanCore.facts.services.borgbackup.secret.\"borgbackup.ssh\".path} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
description = "the rsh to use for the backup";
};
};
}
)
);
default = { };
description = ''
destinations where the machine should be backuped to
'';
};
imports = [
(lib.mkRemovedOptionModule [
"clan"
"borgbackup"
"enable"
] "Just define clan.borgbackup.destinations to enable it")
];
config = lib.mkIf (cfg.destinations != { }) {
services.borgbackup.jobs = lib.mapAttrs (_: dest: {
paths = lib.flatten (map (state: state.folders) (lib.attrValues config.clanCore.state));
exclude = [ "*.pyc" ];
repo = dest.repo;
environment.BORG_RSH = dest.rsh;
compression = "auto,zstd";
startAt = "*-*-* 01:00:00";
persistentTimer = true;
preHook = ''
set -x
'';
encryption = {
mode = "repokey";
passCommand = "cat ${config.clanCore.facts.services.borgbackup.secret."borgbackup.repokey".path}";
};
prune.keep = {
within = "1d"; # Keep all archives from the last day
daily = 7;
weekly = 4;
monthly = 0;
};
}) cfg.destinations;
clanCore.facts.services.borgbackup = {
public."borgbackup.ssh.pub" = { };
secret."borgbackup.ssh" = { };
secret."borgbackup.repokey" = { };
generator.path = [
pkgs.openssh
pkgs.coreutils
pkgs.xkcdpass
];
generator.script = ''
ssh-keygen -t ed25519 -N "" -f "$secrets"/borgbackup.ssh
mv "$secrets"/borgbackup.ssh.pub "$facts"/borgbackup.ssh.pub
xkcdpass -n 4 -d - > "$secrets"/borgbackup.repokey
'';
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "borgbackup-create" ''
set -efu -o pipefail
${lib.concatMapStringsSep "\n" (dest: ''
systemctl start borgbackup-job-${dest.name}
'') (lib.attrValues cfg.destinations)}
'')
(pkgs.writeShellScriptBin "borgbackup-list" ''
set -efu
(${
lib.concatMapStringsSep "\n" (
dest:
# we need yes here to skip the changed url verification
''yes y | borg-job-${dest.name} list --json | jq '[.archives[] | {"name": ("${dest.name}::${dest.repo}::" + .name)}]' ''
) (lib.attrValues cfg.destinations)
}) | ${pkgs.jq}/bin/jq -s 'add'
'')
(pkgs.writeShellScriptBin "borgbackup-restore" ''
set -efux
cd /
IFS=';' read -ra FOLDER <<< "$FOLDERS"
job_name=$(echo "$NAME" | ${pkgs.gawk}/bin/awk -F'::' '{print $1}')
backup_name=''${NAME#"$job_name"::}
if ! command -v borg-job-"$job_name" &> /dev/null; then
echo "borg-job-$job_name not found: Backup name is invalid" >&2
exit 1
fi
yes y | borg-job-"$job_name" extract --list "$backup_name" "''${FOLDER[@]}"
'')
];
clanCore.backups.providers.borgbackup = {
list = "borgbackup-list";
create = "borgbackup-create";
restore = "borgbackup-restore";
};
};
}

View File

@ -0,0 +1,16 @@
Email-based instant messaging for Desktop.
---
!!! warning "Under construction"
!!! info
This module will automatically configure an email server on the machine for handling the e-mail messaging seamlessly.
## Features
- [x] **Email-based**: Uses any email account as its backend.
- [x] **End-to-End Encryption**: Supports Autocrypt to automatically encrypt messages.
- [x] **No Phone Number Required**: Uses your email address instead of a phone number.
- [x] **Cross-Platform**: Available on desktop and mobile platforms.
- [x] **Automatic Server Setup**: Includes your own DeltaChat server for enhanced control and privacy.
- [ ] **Bake a cake**: This module cannot cake a bake.

View File

@ -1,12 +1,11 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 25 ]; # smtp with other hosts
environment.systemPackages = [ pkgs.deltachat-desktop ];
services.maddy =
let
# FIXME move this to public setting
meshname = config.clanCore.secrets.zerotier.facts.zerotier-meshname.value or null;
domain = if meshname == null then "${config.clanCore.machineName}.local" else "${meshname}.vpn";
domain = "${config.clanCore.machineName}.local";
in
{
enable = true;
@ -136,9 +135,7 @@
storage &local_mailboxes
}
'';
ensureAccounts = [
"user@${domain}"
];
ensureAccounts = [ "user@${domain}" ];
ensureCredentials = {
"user@${domain}".passwordFile = pkgs.writeText "dummy" "foobar";
};

View File

@ -0,0 +1,2 @@
Automatically format a disk drive on clan installation
---

View File

@ -0,0 +1,48 @@
{ config, lib, ... }:
{
options.clan.disk-layouts.singleDiskExt4 = {
device = lib.mkOption {
type = lib.types.str;
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
};
};
config = {
boot.loader.grub.efiSupport = lib.mkDefault true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
disko.devices = {
disk = {
main = {
type = "disk";
device = config.clan.disk-layouts.singleDiskExt4.device;
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
priority = 1;
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
}

View File

@ -0,0 +1,2 @@
A modern IRC server
---

View File

@ -0,0 +1,14 @@
_: {
services.ergochat = {
enable = true;
settings = {
datastore = {
autoupgrade = true;
path = "/var/lib/ergo/ircd.db";
};
};
};
clanCore.state.ergochat.folders = [ "/var/lib/ergo" ];
}

View File

@ -1,14 +1,26 @@
{ inputs, ... }: {
{ ... }:
{
flake.clanModules = {
diskLayouts = {
imports = [
./diskLayouts.nix
inputs.disko.nixosModules.default
];
disk-layouts = {
imports = [ ./disk-layouts ];
};
deltachat = ./deltachat.nix;
xfce = ./xfce.nix;
borgbackup = ./borgbackup.nix;
syncthing = ./syncthing.nix;
borgbackup = ./borgbackup;
deltachat = ./deltachat;
ergochat = ./ergochat;
localbackup = ./localbackup;
localsend = ./localsend;
matrix-synapse = ./matrix-synapse;
moonlight = ./moonlight;
root-password = ./root-password;
sshd = ./sshd;
sunshine = ./sunshine;
static-hosts = ./static-hosts;
syncthing = ./syncthing;
thelounge = ./thelounge;
trusted-nix-caches = ./trusted-nix-caches;
user-password = ./user-password;
xfce = ./xfce;
zerotier-static-peers = ./zerotier-static-peers;
zt-tcp-relay = ./zt-tcp-relay;
};
}

View File

@ -0,0 +1,2 @@
Automatically backups current machine to local directory.
---

View File

@ -0,0 +1,223 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.clan.localbackup;
rsnapshotConfig = target: states: ''
config_version 1.2
snapshot_root ${target.directory}
sync_first 1
cmd_cp ${pkgs.coreutils}/bin/cp
cmd_rm ${pkgs.coreutils}/bin/rm
cmd_rsync ${pkgs.rsync}/bin/rsync
cmd_ssh ${pkgs.openssh}/bin/ssh
cmd_logger ${pkgs.inetutils}/bin/logger
cmd_du ${pkgs.coreutils}/bin/du
cmd_rsnapshot_diff ${pkgs.rsnapshot}/bin/rsnapshot-diff
${lib.optionalString (target.preBackupHook != null) ''
cmd_preexec ${pkgs.writeShellScript "preexec.sh" ''
set -efu -o pipefail
${target.preBackupHook}
''}
''}
${lib.optionalString (target.postBackupHook != null) ''
cmd_postexec ${pkgs.writeShellScript "postexec.sh" ''
set -efu -o pipefail
${target.postBackupHook}
''}
''}
retain snapshot ${builtins.toString config.clan.localbackup.snapshots}
${lib.concatMapStringsSep "\n" (state: ''
${lib.concatMapStringsSep "\n" (folder: ''
backup ${folder} ${config.networking.hostName}/
'') state.folders}
'') states}
'';
in
{
options.clan.localbackup = {
targets = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.strMatching "^[a-zA-Z0-9._-]+$";
default = name;
description = "the name of the backup job";
};
directory = lib.mkOption {
type = lib.types.str;
description = "the directory to backup";
};
mountpoint = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "mountpoint of the directory to backup. If set, the directory will be mounted before the backup and unmounted afterwards";
};
preMountHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run before the directory is mounted";
};
postMountHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run after the directory is mounted";
};
preUnmountHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run before the directory is unmounted";
};
postUnmountHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run after the directory is unmounted";
};
preBackupHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run before the backup";
};
postBackupHook = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = "Shell commands to run after the backup";
};
};
}
)
);
default = { };
description = "List of directories where backups are stored";
};
snapshots = lib.mkOption {
type = lib.types.int;
default = 20;
description = "Number of snapshots to keep";
};
};
config =
let
mountHook = target: ''
if [[ -x /run/current-system/sw/bin/localbackup-mount-${target.name} ]]; then
/run/current-system/sw/bin/localbackup-mount-${target.name}
fi
if [[ -x /run/current-system/sw/bin/localbackup-unmount-${target.name} ]]; then
trap "/run/current-system/sw/bin/localbackup-unmount-${target.name}" EXIT
fi
'';
in
lib.mkIf (cfg.targets != { }) {
environment.systemPackages =
[
(pkgs.writeShellScriptBin "localbackup-create" ''
set -efu -o pipefail
export PATH=${
lib.makeBinPath [
pkgs.rsnapshot
pkgs.coreutils
pkgs.util-linux
]
}
${lib.concatMapStringsSep "\n" (target: ''
(
${mountHook target}
echo "Creating backup '${target.name}'"
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target (lib.attrValues config.clanCore.state))}" sync
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target (lib.attrValues config.clanCore.state))}" snapshot
)
'') (builtins.attrValues cfg.targets)}
'')
(pkgs.writeShellScriptBin "localbackup-list" ''
set -efu -o pipefail
export PATH=${
lib.makeBinPath [
pkgs.jq
pkgs.findutils
pkgs.coreutils
pkgs.util-linux
]
}
(${
lib.concatMapStringsSep "\n" (target: ''
(
${mountHook target}
find ${lib.escapeShellArg target.directory} -mindepth 1 -maxdepth 1 -name "snapshot.*" -print0 -type d \
| jq -Rs 'split("\u0000") | .[] | select(. != "") | { "name": ("${target.name}::" + .)}'
)
'') (builtins.attrValues cfg.targets)
}) | jq -s .
'')
(pkgs.writeShellScriptBin "localbackup-restore" ''
set -efu -o pipefail
export PATH=${
lib.makeBinPath [
pkgs.rsync
pkgs.coreutils
pkgs.util-linux
pkgs.gawk
]
}
name=$(awk -F'::' '{print $1}' <<< $NAME)
backupname=''${NAME#$name::}
if command -v localbackup-mount-$name; then
localbackup-mount-$name
fi
if command -v localbackup-unmount-$name; then
trap "localbackup-unmount-$name" EXIT
fi
if [[ ! -d $backupname ]]; then
echo "No backup found $backupname"
exit 1
fi
IFS=';' read -ra FOLDER <<< "$FOLDERS"
for folder in "''${FOLDER[@]}"; do
rsync -a "$backupname/${config.networking.hostName}$folder/" "$folder"
done
'')
]
++ (lib.mapAttrsToList (
name: target:
pkgs.writeShellScriptBin ("localbackup-mount-" + name) ''
set -efu -o pipefail
${lib.optionalString (target.preMountHook != null) target.preMountHook}
${lib.optionalString (target.mountpoint != null) ''
if ! ${pkgs.util-linux}/bin/mountpoint -q ${lib.escapeShellArg target.mountpoint}; then
${pkgs.util-linux}/bin/mount -o X-mount.mkdir ${lib.escapeShellArg target.mountpoint}
fi
''}
${lib.optionalString (target.postMountHook != null) target.postMountHook}
''
) cfg.targets)
++ lib.mapAttrsToList (
name: target:
pkgs.writeShellScriptBin ("localbackup-unmount-" + name) ''
set -efu -o pipefail
${lib.optionalString (target.preUnmountHook != null) target.preUnmountHook}
${lib.optionalString (
target.mountpoint != null
) "${pkgs.util-linux}/bin/umount ${lib.escapeShellArg target.mountpoint}"}
${lib.optionalString (target.postUnmountHook != null) target.postUnmountHook}
''
) cfg.targets;
clanCore.backups.providers.localbackup = {
# TODO list needs to run locally or on the remote machine
list = "localbackup-list";
create = "localbackup-create";
restore = "localbackup-restore";
};
};
}

View File

@ -0,0 +1,2 @@
Securely sharing files and messages over a local network without internet connectivity.
---

View File

@ -0,0 +1,38 @@
{
config,
pkgs,
lib,
...
}:
{
# Integration can be improved, if the following issues get implemented:
# - cli frontend: https://github.com/localsend/localsend/issues/11
# - ipv6 support: https://github.com/localsend/localsend/issues/549
options.clan.localsend = {
enable = lib.mkEnableOption "enable the localsend module";
defaultLocation = lib.mkOption {
type = lib.types.str;
description = "The default download location";
};
package = lib.mkPackageOption pkgs "localsend" { };
};
config = lib.mkIf config.clan.localsend.enable {
clanCore.state.localsend.folders = [
"/var/localsend"
config.clan.localsend.defaultLocation
];
environment.systemPackages = [ config.clan.localsend.package ];
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 53317 ];
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 53317 ];
#TODO: This is currently needed because there is no ipv6 multicasting support yet
#
systemd.network.networks."09-zerotier" = {
networkConfig = {
Address = "192.168.56.2/24";
};
};
};
}

View File

@ -0,0 +1,2 @@
A federated messaging server with end-to-end encryption.
---

View File

@ -0,0 +1,127 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.clan.matrix-synapse;
in
{
options.clan.matrix-synapse = {
enable = lib.mkEnableOption "Enable matrix-synapse";
domain = lib.mkOption {
type = lib.types.str;
description = "The domain name of the matrix server";
};
};
config = lib.mkIf cfg.enable {
services.matrix-synapse = {
enable = true;
settings = {
server_name = cfg.domain;
database = {
args.user = "matrix-synapse";
args.database = "matrix-synapse";
name = "psycopg2";
};
turn_uris = [
"turn:turn.matrix.org?transport=udp"
"turn:turn.matrix.org?transport=tcp"
];
listeners = [
{
port = 8008;
bind_addresses = [ "::1" ];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" ];
compress = true;
}
{
names = [ "federation" ];
compress = false;
}
];
}
];
};
extraConfigFiles = [ "/var/lib/matrix-synapse/registration_shared_secret.yaml" ];
};
systemd.services.matrix-synapse.serviceConfig.ExecStartPre = [
"+${pkgs.writeScript "copy_registration_shared_secret" ''
#!/bin/sh
cp ${config.clanCore.facts.services.matrix-synapse.secret.synapse-registration_shared_secret.path} /var/lib/matrix-synapse/registration_shared_secret.yaml
chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/registration_shared_secret.yaml
chmod 600 /var/lib/matrix-synapse/registration_shared_secret.yaml
''}"
];
clanCore.facts.services."matrix-synapse" = {
secret."synapse-registration_shared_secret" = { };
generator.path = with pkgs; [
coreutils
pwgen
];
generator.script = ''
echo "registration_shared_secret: $(pwgen -s 32 1)" > "$secrets"/synapse-registration_shared_secret
'';
};
services.postgresql.enable = true;
# we need to use both ensusureDatabases and initialScript, because the former runs everytime but with the wrong collation
services.postgresql = {
ensureDatabases = [ "matrix-synapse" ];
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
}
];
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE DATABASE "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'';
};
services.nginx = {
enable = true;
virtualHosts = {
${cfg.domain} = {
locations."= /.well-known/matrix/server".extraConfig = ''
add_header Content-Type application/json;
return 200 '${builtins.toJSON { "m.server" = "matrix.${cfg.domain}:443"; }}';
'';
locations."= /.well-known/matrix/client".extraConfig = ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${
builtins.toJSON {
"m.homeserver" = {
"base_url" = "https://matrix.${cfg.domain}";
};
"m.identity_server" = {
"base_url" = "https://vector.im";
};
}
}';
'';
};
"matrix.${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/_matrix" = {
proxyPass = "http://localhost:8008";
};
locations."/test".extraConfig = ''
return 200 "Hello, world!";
'';
};
};
};
};
}

View File

@ -0,0 +1,2 @@
A desktop streaming client optimized for remote gaming and synchronized movie viewing.
---

View File

@ -0,0 +1,86 @@
{ pkgs, config, ... }:
let
ms-accept = pkgs.callPackage ../pkgs/moonlight-sunshine-accept { };
defaultPort = 48011;
in
{
hardware.opengl.enable = true;
environment.systemPackages = [
pkgs.moonlight-qt
ms-accept
];
systemd.tmpfiles.rules = [
"d '/var/lib/moonlight' 0770 'user' 'users' - -"
"C '/var/lib/moonlight/moonlight.cert' 0644 'user' 'users' - ${
config.clanCore.facts.services.moonlight.secret."moonlight.cert".path or ""
}"
"C '/var/lib/moonlight/moonlight.key' 0644 'user' 'users' - ${
config.clanCore.facts.services.moonlight.secret."moonlight.key".path or ""
}"
];
systemd.user.services.init-moonlight = {
enable = false;
description = "Initializes moonlight";
wantedBy = [ "graphical-session.target" ];
script = ''
${ms-accept}/bin/moonlight-sunshine-accept moonlight init-config --key /var/lib/moonlight/moonlight.key --cert /var/lib/moonlight/moonlight.cert
'';
serviceConfig = {
user = "user";
Type = "oneshot";
WorkingDirectory = "/home/user/";
RunTimeDirectory = "moonlight";
TimeoutSec = "infinity";
Restart = "on-failure";
RemainAfterExit = true;
ReadOnlyPaths = [
"/var/lib/moonlight/moonlight.key"
"/var/lib/moonlight/moonlight.cert"
];
};
};
systemd.user.services.moonlight-join = {
description = "Join sunshine hosts";
script = ''${ms-accept}/bin/moonlight-sunshine-accept moonlight join --port ${builtins.toString defaultPort} --cert '${
config.clanCore.facts.services.moonlight.public."moonlight.cert".value or ""
}' --host fd2e:25da:6035:c98f:cd99:93e0:b9b8:9ca1'';
serviceConfig = {
Type = "oneshot";
TimeoutSec = "infinity";
Restart = "on-failure";
ReadOnlyPaths = [
"/var/lib/moonlight/moonlight.key"
"/var/lib/moonlight/moonlight.cert"
];
};
};
systemd.user.timers.moonlight-join = {
description = "Join sunshine hosts";
wantedBy = [ "timers.target" ];
timerConfig = {
OnUnitActiveSec = "5min";
OnBootSec = "0min";
Persistent = true;
Unit = "moonlight-join.service";
};
};
clanCore.facts.services.moonlight = {
secret."moonlight.key" = { };
secret."moonlight.cert" = { };
public."moonlight.cert" = { };
generator.path = [
pkgs.coreutils
ms-accept
];
generator.script = ''
moonlight-sunshine-accept moonlight init
mv credentials/cakey.pem "$secrets"/moonlight.key
cp credentials/cacert.pem "$secrets"/moonlight.cert
mv credentials/cacert.pem "$facts"/moonlight.cert
'';
};
}

View File

@ -0,0 +1,11 @@
Automatically generates and configures a password for the root user.
---
After the system was installed/deployed the following command can be used to display the root-password:
```bash
clan secrets get {machine_name}-password
```
See also: [Facts / Secrets](../../getting-started/secrets.md)

View File

@ -0,0 +1,20 @@
{ pkgs, config, ... }:
{
users.mutableUsers = false;
users.users.root.hashedPasswordFile =
config.clanCore.facts.services.root-password.secret.password-hash.path;
sops.secrets."${config.clanCore.machineName}-password-hash".neededForUsers = true;
clanCore.facts.services.root-password = {
secret.password = { };
secret.password-hash = { };
generator.path = with pkgs; [
coreutils
xkcdpass
mkpasswd
];
generator.script = ''
xkcdpass --numwords 3 --delimiter - --count 1 > $secrets/password
cat $secrets/password | mkpasswd -s -m sha-512 > $secrets/password-hash
'';
};
}

View File

@ -0,0 +1,2 @@
Enables secure remote access to the machine over ssh
---

View File

@ -0,0 +1,25 @@
{ config, pkgs, ... }:
{
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
services.openssh.hostKeys = [
{
path = config.clanCore.facts.services.openssh.secret."ssh.id_ed25519".path;
type = "ed25519";
}
];
clanCore.facts.services.openssh = {
secret."ssh.id_ed25519" = { };
public."ssh.id_ed25519.pub" = { };
generator.path = [
pkgs.coreutils
pkgs.openssh
];
generator.script = ''
ssh-keygen -t ed25519 -N "" -f $secrets/ssh.id_ed25519
mv $secrets/ssh.id_ed25519.pub $facts/ssh.id_ed25519.pub
'';
};
}

View File

@ -0,0 +1,2 @@
Statically configure the host names of machines based on their respective zerotier-ip.
---

View File

@ -0,0 +1,44 @@
{ lib, config, ... }:
{
options.clan.static-hosts = {
excludeHosts = lib.mkOption {
type = lib.types.listOf lib.types.str;
default =
if config.clan.static-hosts.topLevelDomain != "" then [ ] else [ config.clanCore.machineName ];
description = "Hosts that should be excluded";
};
topLevelDomain = lib.mkOption {
type = lib.types.str;
default = "";
description = "Top level domain to reach hosts";
};
};
config.networking.hosts =
let
clanDir = config.clanCore.clanDir;
machineDir = clanDir + "/machines/";
zerotierIpMachinePath = machines: machineDir + machines + "/facts/zerotier-ip";
machines = builtins.readDir machineDir;
filteredMachines = lib.filterAttrs (
name: _: !(lib.elem name config.clan.static-hosts.excludeHosts)
) machines;
in
lib.filterAttrs (_: value: value != null) (
lib.mapAttrs' (
machine: _:
let
path = zerotierIpMachinePath machine;
in
if builtins.pathExists path then
lib.nameValuePair (builtins.readFile path) (
if (config.clan.static-hosts.topLevelDomain == "") then
[ machine ]
else
[ "${machine}.${config.clan.static-hosts.topLevelDomain}" ]
)
else
null
) filteredMachines
);
}

View File

@ -0,0 +1,2 @@
A desktop streaming server optimized for remote gaming and synchronized movie viewing.
---

View File

@ -0,0 +1,207 @@
{
pkgs,
config,
lib,
...
}:
let
ms-accept = pkgs.callPackage ../pkgs/moonlight-sunshine-accept { };
sunshineConfiguration = pkgs.writeText "sunshine.conf" ''
address_family = both
channels = 5
pkey = /var/lib/sunshine/sunshine.key
cert = /var/lib/sunshine/sunshine.cert
file_state = /var/lib/sunshine/state.json
credentials_file = /var/lib/sunshine/credentials.json
'';
listenPort = 48011;
in
{
networking.firewall = {
allowedTCPPorts = [
47984
47989
47990
48010
48011
];
allowedUDPPorts = [
47998
47999
48000
48002
48010
];
};
networking.firewall.allowedTCPPortRanges = [
{
from = 47984;
to = 48010;
}
];
networking.firewall.allowedUDPPortRanges = [
{
from = 47998;
to = 48010;
}
];
networking.firewall.interfaces."zt+".allowedTCPPorts = [
47984
47989
47990
48010
listenPort
];
networking.firewall.interfaces."zt+".allowedUDPPortRanges = [
{
from = 47998;
to = 48010;
}
];
environment.systemPackages = [
ms-accept
pkgs.sunshine
pkgs.avahi
# Convenience script, until we find a better UX
(pkgs.writers.writeDashBin "sun" ''
${pkgs.sunshine}/bin/sunshine -0 ${sunshineConfiguration} "$@"
'')
# Create a dummy account, for easier setup,
# don't use this account in actual production yet.
(pkgs.writers.writeDashBin "init-sun" ''
${pkgs.sunshine}/bin/sunshine \
--creds "sunshine" "sunshine"
'')
];
# Required to simulate input
boot.kernelModules = [ "uinput" ];
services.udev.extraRules = ''
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"
'';
security = {
rtkit.enable = true;
wrappers.sunshine = {
owner = "root";
group = "root";
capabilities = "cap_sys_admin+p";
source = "${pkgs.sunshine}/bin/sunshine";
};
};
systemd.tmpfiles.rules = [
"d '/var/lib/sunshine' 0770 'user' 'users' - -"
"C '/var/lib/sunshine/sunshine.cert' 0644 'user' 'users' - ${
config.clanCore.facts.services.sunshine.secret."sunshine.cert".path or ""
}"
"C '/var/lib/sunshine/sunshine.key' 0644 'user' 'users' - ${
config.clanCore.facts.services.sunshine.secret."sunshine.key".path or ""
}"
];
hardware.opengl.enable = true;
systemd.user.services.sunshine = {
enable = true;
description = "Sunshine self-hosted game stream host for Moonlight";
startLimitBurst = 5;
startLimitIntervalSec = 500;
script = "/run/current-system/sw/bin/env /run/wrappers/bin/sunshine ${sunshineConfiguration}";
serviceConfig = {
Restart = "on-failure";
RestartSec = "5s";
ReadWritePaths = [ "/var/lib/sunshine" ];
ReadOnlyPaths = [
(config.clanCore.facts.services.sunshine.secret."sunshine.key".path or "")
(config.clanCore.facts.services.sunshine.secret."sunshine.cert".path or "")
];
};
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [
"sunshine-init-state.service"
"sunshine-init-credentials.service"
];
};
systemd.user.services.sunshine-init-state = {
enable = true;
description = "Sunshine self-hosted game stream host for Moonlight";
startLimitBurst = 5;
startLimitIntervalSec = 500;
script = ''
${ms-accept}/bin/moonlight-sunshine-accept sunshine init-state --uuid ${
config.clanCore.facts.services.sunshine.public.sunshine-uuid.value or null
} --state-file /var/lib/sunshine/state.json
'';
serviceConfig = {
Restart = "on-failure";
RestartSec = "5s";
Type = "oneshot";
ReadWritePaths = [ "/var/lib/sunshine" ];
};
wantedBy = [ "graphical-session.target" ];
};
systemd.user.services.sunshine-init-credentials = {
enable = true;
description = "Sunshine self-hosted game stream host for Moonlight";
startLimitBurst = 5;
startLimitIntervalSec = 500;
script = ''
${lib.getExe pkgs.sunshine} ${sunshineConfiguration} --creds sunshine sunshine
'';
serviceConfig = {
Restart = "on-failure";
RestartSec = "5s";
Type = "oneshot";
ReadWritePaths = [ "/var/lib/sunshine" ];
};
wantedBy = [ "graphical-session.target" ];
};
systemd.user.services.sunshine-listener = {
enable = true;
description = "Sunshine self-hosted game stream host for Moonlight";
startLimitBurst = 5;
startLimitIntervalSec = 500;
script = ''
${ms-accept}/bin/moonlight-sunshine-accept sunshine listen --port ${builtins.toString listenPort} --uuid ${
config.clanCore.facts.services.sunshine.public.sunshine-uuid.value or null
} --state /var/lib/sunshine/state.json --cert '${
config.clanCore.facts.services.sunshine.public."sunshine.cert".value or null
}'
'';
serviceConfig = {
# );
Restart = "on-failure";
RestartSec = 5;
ReadWritePaths = [ "/var/lib/sunshine" ];
};
wantedBy = [ "graphical-session.target" ];
};
clanCore.facts.services.ergochat = {
secret."sunshine.key" = { };
secret."sunshine.cert" = { };
public."sunshine-uuid" = { };
public."sunshine.cert" = { };
generator.path = [
pkgs.coreutils
ms-accept
];
generator.script = ''
moonlight-sunshine-accept sunshine init
mv credentials/cakey.pem "$secrets"/sunshine.key
cp credentials/cacert.pem "$secrets"/sunshine.cert
mv credentials/cacert.pem "$facts"/sunshine.cert
mv uuid "$facts"/sunshine-uuid
'';
};
}

View File

@ -0,0 +1,32 @@
A secure, file synchronization app for devices over networks, offering a private alternative to cloud services.
---
## Usage
We recommend configuring this module as an sync-service through the provided options. Although it provides a Web GUI through which more usage scenarios are supported.
## Features
- **Private and Secure**: Syncthing uses TLS encryption to secure data transfer between devices, ensuring that only the intended devices can read your data.
- **Decentralized**: No central server is involved in the data transfer. Each device communicates directly with others.
- **Open Source**: The source code is openly available for audit and contribution, fostering trust and continuous improvement.
- **Cross-Platform**: Syncthing supports multiple platforms including Windows, macOS, Linux, BSD, and Android.
- **Real-time Synchronization**: Changes made to files are synchronized in real-time across all connected devices.
- **Web GUI**: It includes a user-friendly web interface for managing devices and configurations. (`127.0.0.1:8384`)
## Configuration
- **Share Folders**: Select folders to share with connected devices and configure permissions and synchronization parameters.
!!! info
Clan automatically discovers other devices. Automatic discovery requires one machine to be an [introducer](#clan.syncthing.introducer)
If that is not the case you can add the other device by its Device ID manually.
You can find and share Device IDs under the "Add Device" button in the Web GUI. (`127.0.0.1:8384`)
## Troubleshooting
- **Sync Conflicts**: Resolve synchronization conflicts manually by reviewing file versions and modification times in the Web GUI (`127.0.0.1:8384`).
## Support
- **Documentation**: Extensive documentation is available on the [Syncthing website](https://docs.syncthing.net/).

View File

@ -1,14 +1,16 @@
{ config
, pkgs
, lib
, ...
{
config,
pkgs,
lib,
...
}:
{
options.clan.syncthing = {
id = lib.mkOption {
type = lib.types.nullOr lib.types.str;
example = "BABNJY4-G2ICDLF-QQEG7DD-N3OBNGF-BCCOFK6-MV3K7QJ-2WUZHXS-7DTW4AS";
default = config.clanCore.secrets.syncthing.facts."syncthing.pub".value or null;
default = config.clanCore.facts.services.syncthing.public."syncthing.pub".value or null;
defaultText = "config.clanCore.facts.services.syncthing.public.\"syncthing.pub\".value";
};
introducer = lib.mkOption {
description = ''
@ -32,6 +34,10 @@
'';
type = lib.types.listOf lib.types.str;
default = [ ];
example = [
"folder1"
"folder2"
];
};
};
@ -53,32 +59,37 @@
assertions = [
{
assertion =
lib.all (attr: builtins.hasAttr attr config.services.syncthing.settings.folders)
config.clan.syncthing.autoShares;
assertion = lib.all (
attr: builtins.hasAttr attr config.services.syncthing.settings.folders
) config.clan.syncthing.autoShares;
message = ''
Syncthing: If you want to AutoShare a folder, you need to have it configured on the sharing device.
'';
}
];
# Activates inotify compatibility on syncthing
# use mkOverride 900 here as it otherwise would collide with the default of the
# upstream nixos xserver.nix
boot.kernel.sysctl."fs.inotify.max_user_watches" = lib.mkOverride 900 524288;
services.syncthing = {
enable = true;
configDir = "/var/lib/syncthing";
overrideFolders = true;
overrideDevices = true;
overrideFolders = lib.mkDefault (
if (config.clan.syncthing.introducer == null) then true else false
);
overrideDevices = lib.mkDefault (
if (config.clan.syncthing.introducer == null) then true else false
);
dataDir = lib.mkDefault "/home/user/";
group = "syncthing";
key =
lib.mkDefault
config.clanCore.secrets.syncthing.secrets."syncthing.key".path or null;
cert =
lib.mkDefault
config.clanCore.secrets.syncthing.secrets."syncthing.cert".path or null;
key = lib.mkDefault config.clan.secrets.syncthing.secrets."syncthing.key".path or null;
cert = lib.mkDefault config.clan.secrets.syncthing.secrets."syncthing.cert".path or null;
settings = {
options = {
@ -108,7 +119,7 @@
getPendingDevices = "/rest/cluster/pending/devices";
postNewDevice = "/rest/config/devices";
SharedFolderById = "/rest/config/folders/";
apiKey = config.clanCore.secrets.syncthing.secrets."syncthing.api".path or null;
apiKey = config.clanCore.facts.services.syncthing.secret."syncthing.api".path or null;
in
lib.mkIf config.clan.syncthing.autoAcceptDevices {
description = "Syncthing auto accept devices";
@ -120,51 +131,37 @@
set -x
# query pending deviceID's
APIKEY=$(cat ${apiKey})
PENDING=$(${
lib.getExe pkgs.curl
} -X GET -H "X-API-Key: $APIKEY" ${baseAddress}${getPendingDevices})
PENDING=$(${lib.getExe pkgs.curl} -X GET -H "X-API-Key: $APIKEY" ${baseAddress}${getPendingDevices})
PENDING=$(echo $PENDING | ${lib.getExe pkgs.jq} keys[])
# accept pending deviceID's
for ID in $PENDING;do
${
lib.getExe pkgs.curl
} -X POST -d "{\"deviceId\": $ID}" -H "Content-Type: application/json" -H "X-API-Key: $APIKEY" ${baseAddress}${postNewDevice}
${lib.getExe pkgs.curl} -X POST -d "{\"deviceId\": $ID}" -H "Content-Type: application/json" -H "X-API-Key: $APIKEY" ${baseAddress}${postNewDevice}
# get all shared folders by their ID
for folder in ${builtins.toString config.clan.syncthing.autoShares}; do
SHARED_IDS=$(${
lib.getExe pkgs.curl
} -X GET -H "X-API-Key: $APIKEY" ${baseAddress}${SharedFolderById}"$folder" | ${
lib.getExe pkgs.jq
} ."devices")
PATCHED_IDS=$(echo $SHARED_IDS | ${
lib.getExe pkgs.jq
} ".+= [{\"deviceID\": $ID, \"introducedBy\": \"\", \"encryptionPassword\": \"\"}]")
${
lib.getExe pkgs.curl
} -X PATCH -d "{\"devices\": $PATCHED_IDS}" -H "X-API-Key: $APIKEY" ${baseAddress}${SharedFolderById}"$folder"
SHARED_IDS=$(${lib.getExe pkgs.curl} -X GET -H "X-API-Key: $APIKEY" ${baseAddress}${SharedFolderById}"$folder" | ${lib.getExe pkgs.jq} ."devices")
PATCHED_IDS=$(echo $SHARED_IDS | ${lib.getExe pkgs.jq} ".+= [{\"deviceID\": $ID, \"introducedBy\": \"\", \"encryptionPassword\": \"\"}]")
${lib.getExe pkgs.curl} -X PATCH -d "{\"devices\": $PATCHED_IDS}" -H "X-API-Key: $APIKEY" ${baseAddress}${SharedFolderById}"$folder"
done
done
'';
};
systemd.timers.syncthing-auto-accept =
lib.mkIf config.clan.syncthing.autoAcceptDevices
{
description = "Syncthing Auto Accept";
systemd.timers.syncthing-auto-accept = lib.mkIf config.clan.syncthing.autoAcceptDevices {
description = "Syncthing Auto Accept";
wantedBy = [ "syncthing-auto-accept.service" ];
wantedBy = [ "syncthing-auto-accept.service" ];
timerConfig = {
OnActiveSec = lib.mkDefault 60;
OnUnitActiveSec = lib.mkDefault 60;
};
};
timerConfig = {
OnActiveSec = lib.mkDefault 60;
OnUnitActiveSec = lib.mkDefault 60;
};
};
systemd.services.syncthing-init-api-key =
let
apiKey = config.clanCore.secrets.syncthing.secrets."syncthing.api".path or null;
apiKey = config.clanCore.facts.services.syncthing.secret."syncthing.api".path or null;
in
lib.mkIf config.clan.syncthing.autoAcceptDevices {
description = "Set the api key";
@ -175,9 +172,7 @@
set -efu pipefail
APIKEY=$(cat ${apiKey})
${
lib.getExe pkgs.gnused
} -i "s/<apikey>.*<\/apikey>/<apikey>$APIKEY<\/apikey>/" /var/lib/syncthing/config.xml
${lib.getExe pkgs.gnused} -i "s/<apikey>.*<\/apikey>/<apikey>$APIKEY<\/apikey>/" /var/lib/syncthing/config.xml
# sudo systemctl restart syncthing.service
systemctl restart syncthing.service
'';
@ -188,17 +183,22 @@
};
};
clanCore.secrets.syncthing = {
secrets."syncthing.key" = { };
secrets."syncthing.cert" = { };
secrets."syncthing.api" = { };
facts."syncthing.pub" = { };
clanCore.facts.services.syncthing = {
secret."syncthing.key" = { };
secret."syncthing.cert" = { };
secret."syncthing.api" = { };
public."syncthing.pub" = { };
generator.path = [
pkgs.coreutils
pkgs.gnugrep
pkgs.syncthing
];
generator.script = ''
${pkgs.syncthing}/bin/syncthing generate --config "$secrets"
syncthing generate --config "$secrets"
mv "$secrets"/key.pem "$secrets"/syncthing.key
mv "$secrets"/cert.pem "$secrets"/syncthing.cert
cat "$secrets"/config.xml | ${pkgs.gnugrep}/bin/grep -oP '(?<=<device id=")[^"]+' | uniq > "$facts"/syncthing.pub
cat "$secrets"/config.xml | ${pkgs.gnugrep}/bin/grep -oP '<apikey>\K[^<]+' | uniq > "$secrets"/syncthing.api
cat "$secrets"/config.xml | grep -oP '(?<=<device id=")[^"]+' | uniq > "$facts"/syncthing.pub
cat "$secrets"/config.xml | grep -oP '<apikey>\K[^<]+' | uniq > "$secrets"/syncthing.api
'';
};
}

View File

@ -0,0 +1,2 @@
Modern web IRC client
---

View File

@ -0,0 +1,15 @@
_: {
services.thelounge = {
enable = true;
public = true;
extraConfig = {
prefetch = true;
defaults = {
port = 6667;
tls = false;
};
};
};
clanCore.state.thelounde.folders = [ "/var/lib/thelounge" ];
}

View File

@ -0,0 +1,2 @@
This module sets the `clan.lol` and `nix-community` cache up as a trusted cache.
----

View File

@ -0,0 +1,10 @@
{
nix.settings.trusted-substituters = [
"https://cache.clan.lol"
"https://nix-community.cachix.org"
];
nix.settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.clan.lol-1:3KztgSAB5R1M+Dz7vzkBGzXdodizbgLXGXKXlcQLA28="
];
}

View File

@ -0,0 +1,18 @@
Automatically generates and configures a password for the specified user account.
---
If setting the option prompt to true, the user will be prompted to type in their desired password.
!!! Note
This module will set `mutableUsers` to `false`, meaning you can not manage user passwords through `passwd` anymore.
After the system was installed/deployed the following command can be used to display the user-password:
```bash
clan secrets get {machine_name}-user-password
```
See also: [Facts / Secrets](../../getting-started/secrets.md)
To regenerate the password, delete the password files in the clan directory and redeploy the machine.

View File

@ -0,0 +1,49 @@
{
pkgs,
config,
lib,
...
}:
{
options.clan.user-password = {
user = lib.mkOption {
type = lib.types.str;
example = "alice";
description = "The user the password should be generated for.";
};
prompt = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = "Whether the user should be prompted.";
};
};
config = {
users.mutableUsers = false;
users.users.${config.clan.user-password.user}.hashedPasswordFile =
config.clanCore.facts.services.user-password.secret.user-password-hash.path;
sops.secrets."${config.clanCore.machineName}-user-password-hash".neededForUsers = true;
clanCore.facts.services.user-password = {
secret.user-password = { };
secret.user-password-hash = { };
generator.prompt = (
lib.mkIf config.clan.user-password.prompt "Set the password for your $user: ${config.clan.user-password.user}.
You can autogenerate a password, if you leave this prompt blank."
);
generator.path = with pkgs; [
coreutils
xkcdpass
mkpasswd
];
generator.script = ''
if [[ -n $prompt_value ]]; then
echo $prompt_value > $secrets/user-password
else
xkcdpass --numwords 3 --delimiter - --count 1 > $secrets/user-password
fi
cat $secrets/user-password | mkpasswd -s -m sha-512 > $secrets/user-password-hash
'';
};
};
}

View File

@ -0,0 +1,2 @@
A lightweight desktop manager
---

View File

@ -0,0 +1,5 @@
Statically configure the `zerotier` peers of a clan network.
---
Statically configure the `zerotier` peers of a clan network.
Requires a machine, that is the zerotier controller configured in the network.

View File

@ -0,0 +1,71 @@
{
lib,
config,
pkgs,
inputs,
...
}:
let
clanDir = config.clanCore.clanDir;
machineDir = clanDir + "/machines/";
machinesFileSet = builtins.readDir machineDir;
machines = lib.mapAttrsToList (name: _: name) machinesFileSet;
zerotierNetworkIdPath = machines: machineDir + machines + "/facts/zerotier-network-id";
networkIdsUnchecked = builtins.map (
machine:
let
fullPath = zerotierNetworkIdPath machine;
in
if builtins.pathExists fullPath then builtins.readFile fullPath else null
) machines;
networkIds = lib.filter (machine: machine != null) networkIdsUnchecked;
networkId = if builtins.length networkIds == 0 then null else builtins.elemAt networkIds 0;
in
#TODO:trace on multiple found network-ids
#TODO:trace on no single found networkId
{
options.clan.zerotier-static-peers = {
excludeHosts = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ config.clanCore.machineName ];
description = "Hosts that should be excluded";
};
};
config.systemd.services.zerotier-static-peers-autoaccept =
let
machines = builtins.readDir machineDir;
zerotierIpMachinePath = machines: machineDir + machines + "/facts/zerotier-ip";
filteredMachines = lib.filterAttrs (
name: _: !(lib.elem name config.clan.zerotier-static-peers.excludeHosts)
) machines;
hosts = lib.mapAttrsToList (host: _: host) (
lib.mapAttrs' (
machine: _:
let
fullPath = zerotierIpMachinePath machine;
in
if builtins.pathExists fullPath then
lib.nameValuePair (builtins.readFile fullPath) [ machine ]
else
null
) filteredMachines
);
in
lib.mkIf (config.clan.networking.zerotier.controller.enable) {
wantedBy = [ "multi-user.target" ];
after = [ "zerotierone.service" ];
path = [ pkgs.zerotierone ];
serviceConfig.ExecStart = pkgs.writeScript "static-zerotier-peers-autoaccept" ''
#!/bin/sh
${lib.concatMapStringsSep "\n" (host: ''
${
inputs.clan-core.packages.${pkgs.system}.zerotier-members
}/bin/zerotier-members allow --member-ip ${host}
'') hosts}
'';
};
config.clan.networking.zerotier.networkId = lib.mkDefault networkId;
}

View File

@ -0,0 +1,2 @@
Enable ZeroTier VPN over TCP for networks where UDP is blocked.
---

View File

@ -0,0 +1,31 @@
{
pkgs,
lib,
config,
...
}:
{
options.clan.zt-tcp-relay = {
port = lib.mkOption {
type = lib.types.port;
default = 4443;
description = "Port to listen on";
};
};
config = {
networking.firewall.allowedTCPPorts = [ config.clan.zt-tcp-relay.port ];
systemd.services.zt-tcp-relay = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${
pkgs.callPackage ../../pkgs/zt-tcp-relay { }
}/bin/zt-tcp-relay --listen [::]:${builtins.toString config.clan.zt-tcp-relay.port}";
Restart = "always";
RestartSec = "5";
dynamicUsers = true;
};
};
};
}

View File

@ -1,13 +1,34 @@
{ ... }:
{
perSystem =
{ pkgs
, self'
, config
, ...
}: {
{
pkgs,
self',
config,
...
}:
let
writers = pkgs.callPackage ./pkgs/builders/script-writers.nix { };
ansiEscapes = {
reset = ''\033[0m'';
green = ''\033[32m'';
};
# A python program to switch between dev-shells
# usage: select-shell shell-name
# the currently enabled dev-shell gets stored in ./.direnv/selected-shell
select-shell = writers.writePython3Bin "select-shell" {
flakeIgnore = [ "E501" ];
} ./pkgs/scripts/select-shell.py;
in
{
devShells.default = pkgs.mkShell {
packages = [
select-shell
pkgs.tea
# Better error messages than nix 2.18
pkgs.nixVersions.latest
self'.packages.tea-create-pr
self'.packages.merge-after-ci
self'.packages.pending-reviews
@ -15,8 +36,7 @@
config.treefmt.build.wrapper
];
shellHook = ''
# no longer used
rm -f "$(git rev-parse --show-toplevel)/.git/hooks/pre-commit"
echo -e "${ansiEscapes.green}switch to another dev-shell using: select-shell${ansiEscapes.reset}"
'';
};
};

6
docs/.envrc Normal file
View File

@ -0,0 +1,6 @@
source_up
watch_file $(find ./nix -name "*.nix" -printf '%p ')
# Because we depend on nixpkgs sources, uploading to builders takes a long time
use flake .#docs --builders ''

3
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/site/reference
/site/static/Roboto-Regular.ttf
/site/static/FiraCode-VF.ttf

195
docs/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,195 @@
# Contributing
**Continuous Integration (CI)**: Each pull request gets automatically tested by gitea. If any errors are detected, it will block pull requests until they're resolved.
**Dependency Management**: We use the [Nix package manager](https://nixos.org/) to manage dependencies and ensure reproducibility, making your development process more robust.
## Supported Operating Systems
- Linux
- macOS
# Getting Started with the Development Environment
Let's get your development environment up and running:
1. **Install Nix Package Manager**:
- You can install the Nix package manager by either [downloading the Nix installer](https://github.com/DeterminateSystems/nix-installer/releases) or running this command:
```bash
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
2. **Install direnv**:
- To automatically setup a devshell on entering the directory
```bash
nix profile install nixpkgs#nix-direnv-flakes
```
3. **Add direnv to your shell**:
- Direnv needs to [hook into your shell](https://direnv.net/docs/hook.html) to work.
You can do this by executing following command. The example below will setup direnv for `zsh` and `bash`
```bash
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc && echo 'eval "$(direnv hook bash)"' >> ~/.bashrc && eval "$SHELL"
```
4. **Create a Gitea Account**:
- Register an account on https://git.clan.lol
- Fork the [clan-core](https://git.clan.lol/clan/clan-core) repository
- Clone the repository and navigate to it
- Add a new remote called upstream:
```bash
git remote add upstream gitea@git.clan.lol:clan/clan-core.git
```
5. **Register Your Gitea Account Locally**:
- Execute the following command to add your Gitea account locally:
```bash
tea login add
```
- Fill out the prompt as follows:
- URL of Gitea instance: `https://git.clan.lol`
- Name of new Login [git.clan.lol]:
- Do you have an access token? No
- Username: YourUsername
- Password: YourPassword
- Set Optional settings: No
6. **Allow .envrc**:
- When you enter the directory, you'll receive an error message like this:
```bash
direnv: error .envrc is blocked. Run `direnv allow` to approve its content
```
- Execute `direnv allow` to automatically execute the shell script `.envrc` when entering the directory.
7. **(Optional) Install Git Hooks**:
- To syntax check your code you can run:
```bash
nix fmt
```
- To make this automatic install the git hooks
```bash
./scripts/pre-commit
```
8. **Open a Pull Request**:
- To automatically open up a pull request you can use our tool called:
```
merge-after-ci --reviewers Mic92 Lassulus Qubasa
```
# Debugging
Here are some methods for debugging and testing the clan-cli:
## See all possible packages and tests
To quickly show all possible packages and tests execute:
```bash
nix flake show --system no-eval
```
Under `checks` you will find all tests that are executed in our CI. Under `packages` you find all our projects.
```
git+file:///home/lhebendanz/Projects/clan-core
├───apps
│ └───x86_64-linux
│ ├───install-vm: app
│ └───install-vm-nogui: app
├───checks
│ └───x86_64-linux
│ ├───borgbackup omitted (use '--all-systems' to show)
│ ├───check-for-breakpoints omitted (use '--all-systems' to show)
│ ├───clan-dep-age omitted (use '--all-systems' to show)
│ ├───clan-dep-bash omitted (use '--all-systems' to show)
│ ├───clan-dep-e2fsprogs omitted (use '--all-systems' to show)
│ ├───clan-dep-fakeroot omitted (use '--all-systems' to show)
│ ├───clan-dep-git omitted (use '--all-systems' to show)
│ ├───clan-dep-nix omitted (use '--all-systems' to show)
│ ├───clan-dep-openssh omitted (use '--all-systems' to show)
│ ├───"clan-dep-python3.11-mypy" omitted (use '--all-systems' to show)
├───packages
│ └───x86_64-linux
│ ├───clan-cli omitted (use '--all-systems' to show)
│ ├───clan-cli-docs omitted (use '--all-systems' to show)
│ ├───clan-ts-api omitted (use '--all-systems' to show)
│ ├───clan-vm-manager omitted (use '--all-systems' to show)
│ ├───default omitted (use '--all-systems' to show)
│ ├───deploy-docs omitted (use '--all-systems' to show)
│ ├───docs omitted (use '--all-systems' to show)
│ ├───editor omitted (use '--all-systems' to show)
└───templates
├───default: template: Initialize a new clan flake
└───new-clan: template: Initialize a new clan flake
```
You can execute every test separately by following the tree path `nix build .#checks.x86_64-linux.clan-pytest` for example.
## Test Locally in Devshell with Breakpoints
To test the cli locally in a development environment and set breakpoints for debugging, follow these steps:
1. Run the following command to execute your tests and allow for debugging with breakpoints:
```bash
cd ./pkgs/clan-cli
pytest -n0 -s --maxfail=1 ./tests/test_nameofthetest.py
```
You can place `breakpoint()` in your Python code where you want to trigger a breakpoint for debugging.
## Test Locally in a Nix Sandbox
To run tests in a Nix sandbox, you have two options depending on whether your test functions have been marked as impure or not:
### Running Tests Marked as Impure
If your test functions need to execute `nix build` and have been marked as impure because you can't execute `nix build` inside a Nix sandbox, use the following command:
```bash
nix run .#impure-checks
```
This command will run the impure test functions.
### Running Pure Tests
For test functions that have not been marked as impure and don't require executing `nix build`, you can use the following command:
```bash
nix build .#checks.x86_64-linux.clan-pytest --rebuild
```
This command will run all pure test functions.
### Inspecting the Nix Sandbox
If you need to inspect the Nix sandbox while running tests, follow these steps:
1. Insert an endless sleep into your test code where you want to pause the execution. For example:
```python
import time
time.sleep(3600) # Sleep for one hour
```
2. Use `cntr` and `psgrep` to attach to the Nix sandbox. This allows you to interactively debug your code while it's paused. For example:
```bash
psgrep -a -x your_python_process_name
cntr attach <container id, container name or process id>
```
Or you can also use the [nix breakpoint hook](https://nixos.org/manual/nixpkgs/stable/#breakpointhook)
# Standards
- Every new module name should be in kebab-case.
- Every fact definition, where possible should be in kebab-case.

View File

@ -20,11 +20,11 @@ There are several reasons for choosing to self-host. These can include:
Alice wants to self-host a mumble server for her family.
- She visits to the cLAN website, and follows the instructions on how to install cLAN-OS on her server.
- Alice logs into a terminal on her server via SSH (alternatively uses cLAN GUI app)
- Using the cLAN CLI or GUI tool, alice creates a new private network for her family (VPN)
- Alice now browses a list of curated cLAN modules and finds a module for mumble.
- She adds this module to her network using the cLAN tool.
- She visits to the Clan website, and follows the instructions on how to install Clan-OS on her server.
- Alice logs into a terminal on her server via SSH (alternatively uses Clan GUI app)
- Using the Clan CLI or GUI tool, alice creates a new private network for her family (VPN)
- Alice now browses a list of curated Clan modules and finds a module for mumble.
- She adds this module to her network using the Clan tool.
- After that, she uses the clan tool to invite her family members to her network
- Other family members join the private network via the invitation.
- By accepting the invitation, other members automatically install all required software to interact with the network on their machine.
@ -33,7 +33,7 @@ Alice wants to self-host a mumble server for her family.
Alice wants to add a photos app to her private network
- She uses the clan CLI or GUI tool to manage her existing private cLAN family network
- She uses the clan CLI or GUI tool to manage her existing private Clan family network
- She discovers a module for photoprism, and adds it to her server using the tool
- Other members who are already part of her network, will receive a notification that an update is required to their environment
- After accepting, all new software and services to interact with the new photoprism service will be installed automatically.

View File

@ -1,4 +1,4 @@
# Joining a cLAN network
# Joining a Clan network
## General Description
@ -8,13 +8,13 @@ Joining a self-hosted infrastructure involves connecting to a network, server, o
### Story 1: Joining a private network
Alice' son Bob has never heard of cLAN, but receives an invitation URL from Alice who already set up private cLAN network for her family.
Alice' son Bob has never heard of Clan, but receives an invitation URL from Alice who already set up private Clan network for her family.
Bob opens the invitation link and lands on the cLAN website. He quickly learns about what cLAN is and can see that the invitation is for a private network of his family that hosts a number of services, like a private voice chat and a photo sharing platform.
Bob opens the invitation link and lands on the Clan website. He quickly learns about what Clan is and can see that the invitation is for a private network of his family that hosts a number of services, like a private voice chat and a photo sharing platform.
Bob decides to join the network and follows the instructions to install the cLAN tool on his computer.
Bob decides to join the network and follows the instructions to install the Clan tool on his computer.
Feeding the invitation link to the cLAN tool, bob registers his machine with the network.
Feeding the invitation link to the Clan tool, bob registers his machine with the network.
All programs required to interact with the network will be installed and configured automatically and securely.
@ -22,7 +22,7 @@ Optionally, bob can customize the configuration of these programs through a simp
### Story 2: Receiving breaking changes
The cLAN family network which Bob is part of received an update.
The Clan family network which Bob is part of received an update.
The existing photo sharing service has been removed and replaced with another alternative service. The new photo sharing service requires a different client app to view and upload photos.
@ -30,7 +30,7 @@ Bob accepts the update. Now his environment will be updated. The old client soft
Because Bob has customized the previous photo viewing app, he is notified that this customization is no longer valid, as the software has been removed (deprecation message).l
Optionally, Bob can now customize the new photo viewing software through his cLAN configuration app or via a config file.
Optionally, Bob can now customize the new photo viewing software through his Clan configuration app or via a config file.
## Challenges

View File

@ -1,10 +1,10 @@
# cLAN module maintaining
# Clan module maintaining
## General Description
cLAN modules are pieces of software that can be used by admins to build a private or public infrastructure.
Clan modules are pieces of software that can be used by admins to build a private or public infrastructure.
cLAN modules should have the following properties:
Clan modules should have the following properties:
1. Documented: It should be clear what the module does and how to use it.
1. Self contained: A module should be usable as is. If it requires any other software or settings, those should be delivered with the module itself.

View File

@ -1,138 +0,0 @@
# API Guidelines
This issue serves to collect our common understanding how to design our API so that it is extensible and usable and understandable.
## Resource oriented
A resource-oriented API is generally modeled as a resource hierarchy, where each node is either a simple resource or a collection resource. For convenience, they are often called a resource and a collection, respectively.
Examples of Resource Nouns:
`machine`
`user`
`flake`
Often resources have sub-resources. Even if it is not foreseen, it is recommended to use plural (trailing `s`) on resources to allow them to be collections of sub-resources.
e.g,
`users`
->
`users/*/profile`
## Verbs
Verbs should not be part of the URL
Bad:
`/api/create-products`
Good:
`/api/products`
Only resources are part of the URL, verbs are described via the HTTP Method.
Exception:
If a different HTTP Method must be used for technical reasons it is okay to terminate the path with a (short) verb / action.
Okay ish:
`/api/products/create`
## Usually the following HTTP Methods exist to interact with a resource
- POST (create an order for a resource)
- GET (retrieve the information)
- PUT (update and replace information)
- PATCH (update and modify information) **(Not used yet)**
- DELETE (delete the item)
## Every resource should be CRUD compatible
All API resources MUST be designed in a way that allows the typical CRUD operations.
Where crud stands for:
C - Create
R - Read
U - Update
D - Delete
Resources should implement at least a "Read" operation.
## Body
Use JSON as an exchange format.
All responses MUST be JSON parseable.
Bad:
`bare string`
Better:
`"quoted string"`
Best: (Enveloped see next section)
`{ name: "quoted string"}`
Errors should have a consistent JSON format, such that it is clear in which field to look at for displaying error messages.
## Envelop all Data collections
Response data should be wrapped into an JSON Object `{}`
Lists `[]` should also contain Objects `{}`.
This allows everything, to be extensible, without breaking backwards compatibility. (Adding fields is trivial, since the schema doesn't change)
Example:
```
{
"users": [{
first_name: "John",
last_name: "Doe",
}, {
first_name: "Jane",
last_name: "Doe",
}
....
],
"skip": 0,
"limit": 20,
....
}
```
Bad Example of a breaking change:
`GET /api/flakes`
`old`
```
[
"dream2nix"
"disko"
]
```
`new`
```
[
{
name: "dream2nix",
url: "github/...."
},
{
name: "disko",
url: "github/...."
}
]
```
Those kind of breaking changes can be avoided by using an object from the beginning.
Even if the object only contains one key, it is extensible, without breaking.
## More will follow.
...maybe

View File

@ -1,69 +0,0 @@
# cLAN config
`clan config` allows you to manage your nixos configuration via the terminal.
Similar as how `git config` reads and sets git options, `clan config` does the same with your nixos options
It also supports auto completion making it easy to find the right options.
## Set up clan-config
Add the clan tool to your flake inputs:
```
clan.url = "git+https://git.clan.lol/clan/clan-core";
```
and inside the mkFlake:
```
imports = [
inputs.clan.flakeModules.clan-config
];
```
Add an empty config file and add it to git
```command
echo "{}" > ./clan-settings.json
git add ./clan-settings.json
```
Import the clan-config module into your nixos configuration:
```nix
{
imports = [
# clan-settings.json is located in the same directory as your flake.
# Adapt the path if necessary.
(builtins.fromJSON (builtins.readFile ./clan-settings.json))
];
}
```
Make sure your nixos configuration is set a default
```nix
{self, ...}: {
flake.nixosConfigurations.default = self.nixosConfigurations.my-machine;
}
```
Use all inputs provided by the clan-config devShell in your own devShell:
```nix
{ ... }: {
perSystem = { pkgs, self', ... }: {
devShells.default = pkgs.mkShell {
inputsFrom = [ self'.devShells.clan-config ];
# ...
};
};
}
```
re-load your dev-shell to make the clan tool available.
```command
clan config --help
```

View File

@ -1,227 +0,0 @@
# Website Template
Welcome to our website template repository! This template is designed to help you and your team build high-quality websites efficiently. We've carefully chosen the technologies to make development smooth and enjoyable. Here's what you can expect from this template:
**Frontend**: Our frontend is powered by [React NextJS](https://nextjs.org/), a popular and versatile framework for building web applications.
**Backend**: For the backend, we use Python along with the [FastAPI framework](https://fastapi.tiangolo.com/). To ensure seamless communication between the frontend and backend, we generate an `openapi.json` file from the Python code, which defines the REST API. This file is then used with [Orval](https://orval.dev/) to generate TypeScript bindings for the REST API. We're committed to code correctness, so we use [mypy](https://mypy-lang.org/) to ensure that our Python code is statically typed correctly. For backend testing, we rely on [pytest](https://docs.pytest.org/en/7.4.x/).
**Continuous Integration (CI)**: We've set up a CI bot that rigorously checks your code using the quality assurance (QA) tools mentioned above. If any errors are detected, it will block pull requests until they're resolved.
**Dependency Management**: We use the [Nix package manager](https://nixos.org/) to manage dependencies and ensure reproducibility, making your development process more robust.
## Supported Operating Systems
- Linux
- macOS
# Getting Started with the Development Environment
Let's get your development environment up and running:
1. **Install Nix Package Manager**:
- You can install the Nix package manager by either [downloading the Nix installer](https://github.com/DeterminateSystems/nix-installer/releases) or running this command:
```bash
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
2. **Install direnv**:
- Download the direnv package from [here](https://direnv.net/docs/installation.html) or run the following command:
```bash
curl -sfL https://direnv.net/install.sh | bash
```
3. **Add direnv to your shell**:
- Direnv needs to [hook into your shell](https://direnv.net/docs/hook.html) to work.
You can do this by executing following command:
```bash
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc && echo 'eval "$(direnv hook bash)"' >> ~/.bashrc && eval "$SHELL"
```
4. **Clone the Repository and Navigate**:
- Clone this repository and navigate to it.
5. **Allow .envrc**:
- When you enter the directory, you'll receive an error message like this:
```bash
direnv: error .envrc is blocked. Run `direnv allow` to approve its content
```
- Execute `direnv allow` to automatically execute the shell script `.envrc` when entering the directory.
6. **Build the Backend**:
- Go to the `pkgs/clan-cli` directory and execute:
```bash
direnv allow
```
- Wait for the backend to build.
7. **Start the Backend Server**:
- To start the backend server, execute:
```bash
clan webui --reload --no-open --log-level debug
```
- The server will automatically restart if any Python files change.
8. **Build the Frontend**:
- In a different shell, navigate to the `pkgs/ui` directory and execute:
```bash
direnv allow
```
- Wait for the frontend to build.
NOTE: If you have the error "@clan/colors.json" you executed `npm install`, please do not do that. `direnv reload` will handle dependency management. Please delete node_modules with `rm -rf node_modules`.
9. **Start the Frontend**:
- To start the frontend, execute:
```bash
npm run dev
```
- Access the website by going to [http://localhost:3000](http://localhost:3000).
# Setting Up Your Git Workflow
Let's set up your Git workflow to collaborate effectively:
1. **Register Your Gitea Account Locally**:
- Execute the following command to add your Gitea account locally:
```bash
tea login add
```
- Fill out the prompt as follows:
- URL of Gitea instance: `https://gitea.gchq.icu`
- Name of new Login [gitea.gchq.icu]: `gitea.gchq.icu:7171`
- Do you have an access token? No
- Username: YourUsername
- Password: YourPassword
- Set Optional settings: No
2. **Git Workflow**:
1. Add your changes to Git using `git add <file1> <file2>`.
2. Run `nix fmt` to lint your files.
3. Commit your changes with a descriptive message: `git commit -a -m "My descriptive commit message"`.
4. Make sure your branch has the latest changes from upstream by executing:
```bash
git fetch && git rebase origin/main --autostash
```
5. Use `git status` to check for merge conflicts.
6. If conflicts exist, resolve them. Here's a tutorial for resolving conflicts in [VSCode](https://code.visualstudio.com/docs/sourcecontrol/overview#_merge-conflicts).
7. After resolving conflicts, execute `git merge --continue` and repeat step 5 until there are no conflicts.
3. **Create a Pull Request**:
- To automatically open a pull request that gets merged if all tests pass, execute:
```bash
merge-after-ci
```
4. **Review Your Pull Request**:
- Visit https://gitea.gchq.icu and go to the project page. Check under "Pull Requests" for any issues with your pull request.
5. **Push Your Changes**:
- If there are issues, fix them and redo step 2. Afterward, execute:
```bash
git push origin HEAD:YourUsername-main
```
- This will directly push to your open pull request.
# Debugging
When working on the backend of your project, debugging is an essential part of the development process. Here are some methods for debugging and testing the backend of your application:
## Test Backend Locally in Devshell with Breakpoints
To test the backend locally in a development environment and set breakpoints for debugging, follow these steps:
1. Run the following command to execute your tests and allow for debugging with breakpoints:
```bash
pytest -n0 -s --maxfail=1
```
You can place `breakpoint()` in your Python code where you want to trigger a breakpoint for debugging.
## Test Backend Locally in a Nix Sandbox
To run your backend tests in a Nix sandbox, you have two options depending on whether your test functions have been marked as impure or not:
### Running Tests Marked as Impure
If your test functions need to execute `nix build` and have been marked as impure because you can't execute `nix build` inside a Nix sandbox, use the following command:
```bash
nix run .#impure-checks
```
This command will run the impure test functions.
### Running Pure Tests
For test functions that have not been marked as impure and don't require executing `nix build`, you can use the following command:
```bash
nix build .#checks.x86_64-linux.clan-pytest --rebuild
```
This command will run all pure test functions.
### Running schemathesis fuzzer on GET requests
```bash
nix run .#runSchemaTests
```
If you want to test more request types edit the file `checks/impure/flake-module.nix`
### Inspecting the Nix Sandbox
If you need to inspect the Nix sandbox while running tests, follow these steps:
1. Insert an endless sleep into your test code where you want to pause the execution. For example:
```python
import time
time.sleep(3600) # Sleep for one hour
```
2. Use `cntr` and `psgrep` to attach to the Nix sandbox. This allows you to interactively debug your code while it's paused. For example:
```bash
cntr exec -w your_sandbox_name
psgrep -a -x your_python_process_name
```
These debugging and testing methods will help you identify and fix issues in your backend code efficiently, ensuring the reliability and robustness of your application.
For more information on testing read [property and contract based testing](testing.md)
# Using this Template
To make the most of this template:
1. Set up a new Gitea account named `ui-asset-bot`. Generate an access token with all access permissions and set it under `settings/actions/secrets` as a secret called `BOT_ACCESS_TOKEN`.
- Also, edit the file `.gitea/workflows/ui_assets.yaml` and change the `BOT_EMAIL` variable to match the email you set for that account. Gitea matches commits to accounts by their email address, so this step is essential.
2. Create a second Gitea account named `merge-bot`. Edit the file `pkgs/merge-after-ci/default.nix` if the name should be different. Under "Branches," set the main branch to be protected and add `merge-bot` to the whitelisted users for pushing. Set the unprotected file pattern to `**/ui-assets.nix`.
- Enable the status check for "build / test (pull_request)."
3. Add both `merge-bot` and `ui-asset-bot` as collaborators.
- Set the option to "Delete pull request branch after merge by default."
- Also, set the default merge style to "Rebase then create merge commit."
With this template, you're well-equipped to build and collaborate on high-quality websites efficiently. Happy coding!.
# API guidelines
see [./api-guidelines](./api-guidelines)

View File

@ -1,115 +0,0 @@
# Managing NixOS Machines
## Add Your First Machine
To start managing a new machine, use the following commands to create and then list your machines:
```shellSession
$ clan machines create my-machine
$ clan machines list
my-machine
```
## Configure Your Machine
In the example below, we demonstrate how to add a new user named `my-user` and set a password. This user will be configured to log in to the machine `my-machine`.
### Creating a New User
```shellSession
# Add a new user
$ clan config --machine my-machine users.users.my-user.isNormalUser true
# Set a password for the user
$ clan config --machine my-machine users.users.my-user.hashedPassword $(mkpasswd)
```
_Note: The `$(mkpasswd)` command generates a hashed password. Ensure you have the `mkpasswd` utility installed or use an alternative method to generate a secure hashed password._
## Test Your Machine Configuration Inside a VM
Before deploying your configuration to a live environment, you can run a virtual machine (VM) to test the settings:
```shellSession
$ clan vms run my-machine
```
This command run a VM based on the configuration of `my-machine`, allowing you to verify changes in a controlled environment.
## Installing a New Machine
Clan CLI, in conjunction with [nixos-anywhere](https://github.com/nix-community/nixos-anywhere), provides a seamless method for installing NixOS on various machines.
This process involves preparing a suitable hardware and disk partitioning configuration and ensuring the target machine is accessible via SSH.
### Prerequisites
- A running Linux system with SSH on the target machine is required. This is typically pre-configured for many server providers.
- For installations on physical hardware, create a NixOS installer image and transfer it to a bootable USB drive as described below.
## Creating a Bootable USB Drive on Linux
To create a bootable USB flash drive with the NixOS installer:
1. **Build the Installer Image**:
```shellSession
$ nix build git+https://git.clan.lol/clan/clan-core.git#install-iso
```
2. **Prepare the USB Flash Drive**:
- Insert your USB flash drive into your computer.
- Identify your flash drive with `lsblk`. Look for the device with a matching size.
- Ensure all partitions on the drive are unmounted. Replace `sdX` in the command below with your device identifier (like `sdb`, etc.):
```shellSession
sudo umount /dev/sdX*
```
3. **Write the Image to the USB Drive**:
- Use the `dd` utility to write the NixOS installer image to your USB drive:
```shellSession
sudo dd bs=4M conv=fsync oflag=direct status=progress if=./result/stick.raw of=/dev/sdX
```
4. **Boot and Connect**:
- After writing the installer to the USB drive, use it to boot the target machine.
- The installer will display an IP address and a root password, which you can use to connect via SSH.
### Finishing the installation
With the target machine running Linux and accessible via SSH, execute the following command to install NixOS on the target machine, replacing `<target_host>` with the machine's hostname or IP address:
```shellSession
$ clan machines install my-machine <target_host>
```
## Update Your Machines
Clan CLI enables you to remotely update your machines over SSH. This requires setting up a deployment address for each target machine.
### Setting the Deployment Address
Replace `host_or_ip` with the actual hostname or IP address of your target machine:
```shellSession
$ clan config --machine my-machine clan.networking.deploymentAddress root@host_or_ip
```
_Note: The use of `root@` in the deployment address implies SSH access as the root user. Ensure that the root login is secured and only used when necessary._
### Updating Machine Configurations
Execute the following command to update the specified machine:
```shellSession
$ clan machines update my-machine
```
You can also update all configured machines simultaneously by omitting the machine name:
```shellSession
$ clan machines update
```

41
docs/main.py Normal file
View File

@ -0,0 +1,41 @@
from typing import Any
def define_env(env: Any) -> None:
static_dir = "/static/"
video_dir = "https://clan.lol/" + "videos/"
asciinema_dir = static_dir + "asciinema-player/"
@env.macro
def video(name: str) -> str:
return f"""<video loop muted autoplay id="{name}">
<source src={video_dir + name} type="video/webm">
Your browser does not support the video tag.
</video>"""
@env.macro
def asciinema(name: str) -> str:
return f"""<div id="{name}">
<script>
// Function to load the script and then create the Asciinema player
function loadAsciinemaPlayer() {{
var script = document.createElement('script');
script.src = "{asciinema_dir}/asciinema-player.min.js";
script.onload = function() {{
AsciinemaPlayer.create('{video_dir + name}', document.getElementById("{name}"), {{
loop: true,
autoPlay: true,
controls: false,
speed: 1.5,
theme: "solarized-light"
}});
}};
document.head.appendChild(script);
}}
// Load the Asciinema player script
loadAsciinemaPlayer();
</script>
<link rel="stylesheet" type="text/css" href="{asciinema_dir}/asciinema-player.css" />
</div>"""

159
docs/mkdocs.yml Normal file
View File

@ -0,0 +1,159 @@
site_name: Clan Documentation
site_url: https://docs.clan.lol
repo_url: https://git.clan.lol/clan/clan-core/
repo_name: clan-core
edit_uri: _edit/main/docs/docs/
validation:
omitted_files: warn
absolute_links: warn
unrecognized_links: warn
markdown_extensions:
- admonition
- attr_list
- footnotes
- md_in_html
- meta
- plantuml_markdown
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.details
- pymdownx.highlight:
use_pygments: true
anchor_linenums: true
- pymdownx.keys
- toc:
title: On this page
exclude_docs: |
.*
!templates/
/drafts/
nav:
- Blog:
- blog/index.md
- Getting started:
- index.md
- Installer: getting-started/installer.md
- Configure: getting-started/configure.md
- Secrets & Facts: getting-started/secrets.md
- Deploy Machine: getting-started/deploy.md
- Mesh VPN: getting-started/mesh-vpn.md
- Backup & Restore: getting-started/backups.md
- Flake-parts: getting-started/flake-parts.md
- Modules:
- Clan Modules:
- reference/clanModules/borgbackup.md
- reference/clanModules/deltachat.md
- reference/clanModules/disk-layouts.md
- reference/clanModules/ergochat.md
- reference/clanModules/localbackup.md
- reference/clanModules/localsend.md
- reference/clanModules/matrix-synapse.md
- reference/clanModules/moonlight.md
- reference/clanModules/root-password.md
- reference/clanModules/sshd.md
- reference/clanModules/sunshine.md
- reference/clanModules/syncthing.md
- reference/clanModules/static-hosts.md
- reference/clanModules/thelounge.md
- reference/clanModules/trusted-nix-caches.md
- reference/clanModules/user-password.md
- reference/clanModules/xfce.md
- reference/clanModules/zerotier-static-peers.md
- reference/clanModules/zt-tcp-relay.md
- CLI:
- reference/cli/index.md
- reference/cli/backups.md
- reference/cli/config.md
- reference/cli/facts.md
- reference/cli/flakes.md
- reference/cli/flash.md
- reference/cli/history.md
- reference/cli/machines.md
- reference/cli/secrets.md
- reference/cli/ssh.md
- reference/cli/vms.md
- Clan Core:
- reference/clan-core/index.md
- reference/clan-core/backups.md
- reference/clan-core/facts.md
- reference/clan-core/sops.md
- reference/clan-core/state.md
- Contributing: contributing/contributing.md
docs_dir: site
site_dir: out
theme:
font: false
logo: https://clan.lol/static/logo/clan-white.png
favicon: https://clan.lol/static/dark-favicon/128x128.png
name: material
features:
- navigation.instant
- navigation.tabs
- content.code.annotate
- content.code.copy
- content.tabs.link
icon:
repo: fontawesome/brands/git-alt
custom_dir: overrides
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: teal
accent: deep purple
toggle:
icon: material/weather-night
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
primary: teal
accent: deep purple
scheme: slate
toggle:
icon: material/weather-sunny
name: Switch to light mode
extra_css:
- static/extra.css
extra:
social:
- icon: fontawesome/regular/comment
link: https://matrix.to/#/#clan:lassul.us
- icon: fontawesome/brands/gitlab
link: https://git.clan.lol/clan/clan-core
- icon: fontawesome/brands/github
link: https://github.com/clan-lol/clan-core
- icon: fontawesome/solid/rss
link: /feed_rss_created.xml
plugins:
- search
- blog
- macros
- rss:
match_path: blog/posts/.*
use_git: false
date_from_meta:
as_creation: "date"
as_update: "date"
datetime_format: "%Y-%m-%d %H:%M"
default_timezone: Europe/Paris
default_time: "17:18"
categories:
- categories
- tags

52
docs/nix/default.nix Normal file
View File

@ -0,0 +1,52 @@
{
pkgs,
module-docs,
clan-cli-docs,
asciinema-player-js,
asciinema-player-css,
roboto,
fira-code,
...
}:
let
uml-c4 = pkgs.python3Packages.plantuml-markdown.override { plantuml = pkgs.plantuml-c4; };
in
pkgs.stdenv.mkDerivation {
name = "clan-documentation";
src = ../.;
nativeBuildInputs =
[
pkgs.python3
uml-c4
]
++ (with pkgs.python3Packages; [
mkdocs
mkdocs-material
mkdocs-rss-plugin
mkdocs-macros
]);
configurePhase = ''
mkdir -p ./site/reference/cli
cp -af ${module-docs}/* ./site/reference/
cp -af ${clan-cli-docs}/* ./site/reference/cli/
mkdir -p ./site/static/asciinema-player
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css
# Link to fonts
ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/
'';
buildPhase = ''
mkdocs build --strict
ls -la .
'';
installPhase = ''
cp -a out/ $out/
'';
}

49
docs/nix/deploy-docs.nix Normal file
View File

@ -0,0 +1,49 @@
{
writeShellScriptBin,
coreutils,
openssh,
rsync,
lib,
docs,
}:
writeShellScriptBin "deploy-docs" ''
set -eu -o pipefail
export PATH="${
lib.makeBinPath [
coreutils
openssh
rsync
]
}"
#########################################
# #
# DO NOT PRINT THE SSH KEY TO THE LOGS #
# #
#########################################
set +x
if [ -n "''${SSH_HOMEPAGE_KEY:-}" ]; then
echo "$SSH_HOMEPAGE_KEY" > ./ssh_key
chmod 600 ./ssh_key
sshExtraArgs="-i ./ssh_key"
else
sshExtraArgs=
fi
set -x
###########################
# #
# END OF DANGER ZONE #
# #
###########################
rsync \
-e "ssh -o StrictHostKeyChecking=no $sshExtraArgs" \
-a ${docs}/ \
www@clan.lol:/var/www/docs.clan.lol
if [ -e ./ssh_key ]; then
rm ./ssh_key
fi
''

83
docs/nix/flake-module.nix Normal file
View File

@ -0,0 +1,83 @@
{ inputs, self, ... }:
{
perSystem =
{
config,
self',
pkgs,
...
}:
let
# Simply evaluated options (JSON)
# { clanCore = «derivation JSON»; clanModules = { ${name} = «derivation JSON» }; }
jsonDocs = import ./get-module-docs.nix {
inherit (inputs) nixpkgs;
inherit pkgs self;
inherit (self.nixosModules) clanCore;
inherit (self) clanModules;
};
clanModulesFileInfo = pkgs.writeText "info.json" (builtins.toJSON jsonDocs.clanModules);
clanModulesReadmes = pkgs.writeText "info.json" (builtins.toJSON jsonDocs.clanModulesReadmes);
# Simply evaluated options (JSON)
renderOptions =
pkgs.runCommand "renderOptions.py"
{
# TODO: ruff does not splice properly in nativeBuildInputs
depsBuildBuild = [ pkgs.ruff ];
nativeBuildInputs = [
pkgs.python3
pkgs.mypy
];
}
''
install ${./scripts/renderOptions.py} $out
patchShebangs --build $out
ruff format --check --diff $out
ruff --line-length 88 $out
mypy --strict $out
'';
asciinema-player-js = pkgs.fetchurl {
url = "https://github.com/asciinema/asciinema-player/releases/download/v3.7.0/asciinema-player.min.js";
sha256 = "sha256-Ymco/+FinDr5YOrV72ehclpp4amrczjo5EU3jfr/zxs=";
};
asciinema-player-css = pkgs.fetchurl {
url = "https://github.com/asciinema/asciinema-player/releases/download/v3.7.0/asciinema-player.css";
sha256 = "sha256-GZMeZFFGvP5GMqqh516mjJKfQaiJ6bL38bSYOXkaohc=";
};
module-docs = pkgs.runCommand "rendered" { nativeBuildInputs = [ pkgs.python3 ]; } ''
export CLAN_CORE=${jsonDocs.clanCore}/share/doc/nixos/options.json
# A file that contains the links to all clanModule docs
export CLAN_MODULES=${clanModulesFileInfo}
export CLAN_MODULES_READMES=${clanModulesReadmes}
mkdir $out
# The python script will place mkDocs files in the output directory
python3 ${renderOptions}
'';
in
{
devShells.docs = pkgs.callPackage ./shell.nix {
inherit (self'.packages) docs clan-cli-docs;
inherit module-docs;
inherit asciinema-player-js;
inherit asciinema-player-css;
};
packages = {
docs = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (self'.packages) clan-cli-docs;
inherit (inputs) nixpkgs;
inherit module-docs;
inherit asciinema-player-js;
inherit asciinema-player-css;
};
deploy-docs = pkgs.callPackage ./deploy-docs.nix { inherit (config.packages) docs; };
inherit module-docs;
};
};
}

View File

@ -0,0 +1,51 @@
{
nixpkgs,
pkgs,
clanCore,
clanModules,
self,
}:
let
allNixosModules = (import "${nixpkgs}/nixos/modules/module-list.nix") ++ [
"${nixpkgs}/nixos/modules/misc/assertions.nix"
{ nixpkgs.hostPlatform = "x86_64-linux"; }
];
clanCoreNixosModules = [
clanCore
{ clanCore.clanDir = ./.; }
] ++ allNixosModules;
# TODO: optimally we would not have to evaluate all nixos modules for every page
# but some of our module options secretly depend on nixos modules.
# We would have to get rid of these implicit dependencies and make them explicit
clanCoreNixos = pkgs.nixos { imports = clanCoreNixosModules; };
# using extendModules here instead of re-evaluating nixos every time
# improves eval performance slightly (10%)
getOptions = modules: (clanCoreNixos.extendModules { inherit modules; }).options;
evalDocs =
options:
pkgs.nixosOptionsDoc {
options = options;
warningsAreErrors = false;
};
# clanModules docs
clanModulesDocs = builtins.mapAttrs (
name: module: (evalDocs ((getOptions [ module ]).clan.${name} or { })).optionsJSON
) clanModules;
clanModulesReadmes = builtins.mapAttrs (
module_name: _module: self.lib.modules.getReadme module_name
) clanModules;
# clanCore docs
clanCoreDocs = (evalDocs (getOptions [ ]).clanCore).optionsJSON;
in
{
inherit clanModulesReadmes;
clanCore = clanCoreDocs;
clanModules = clanModulesDocs;
}

View File

@ -0,0 +1,237 @@
# Options are available in the following format:
# https://github.com/nixos/nixpkgs/blob/master/nixos/lib/make-options-doc/default.nix
#
# ```json
# {
# ...
# "fileSystems.<name>.options": {
# "declarations": ["nixos/modules/tasks/filesystems.nix"],
# "default": {
# "_type": "literalExpression",
# "text": "[\n \"defaults\"\n]"
# },
# "description": "Options used to mount the file system.",
# "example": {
# "_type": "literalExpression",
# "text": "[\n \"data=journal\"\n]"
# },
# "loc": ["fileSystems", "<name>", "options"],
# "readOnly": false,
# "type": "non-empty (list of string (with check: non-empty))"
# "relatedPackages": "- [`pkgs.tmux`](\n https://search.nixos.org/packages?show=tmux&sort=relevance&query=tmux\n )\n",
# }
# }
# ```
import json
import os
from pathlib import Path
from typing import Any
# Get environment variables
CLAN_CORE = os.getenv("CLAN_CORE")
CLAN_MODULES = os.environ.get("CLAN_MODULES")
CLAN_MODULES_READMES = os.environ.get("CLAN_MODULES_READMES")
OUT = os.environ.get("out")
def sanitize(text: str) -> str:
return text.replace(">", "\\>")
def replace_store_path(text: str) -> tuple[str, str]:
res = text
if text.startswith("/nix/store/"):
res = "https://git.clan.lol/clan/clan-core/src/branch/main/" + str(
Path(*Path(text).parts[4:])
)
name = Path(res).name
return (res, name)
def render_option_header(name: str) -> str:
return f"# {name}\n"
def join_lines_with_indentation(lines: list[str], indent: int = 4) -> str:
"""
Joins multiple lines with a specified number of whitespace characters as indentation.
Args:
lines (list of str): The lines of text to join.
indent (int): The number of whitespace characters to use as indentation for each line.
Returns:
str: The indented and concatenated string.
"""
# Create the indentation string (e.g., four spaces)
indent_str = " " * indent
# Join each line with the indentation added at the beginning
return "\n".join(indent_str + line for line in lines)
def render_option(name: str, option: dict[str, Any], level: int = 3) -> str:
read_only = option.get("readOnly")
res = f"""
{"#" * level} {sanitize(name)}
{"Readonly" if read_only else ""}
{option.get("description", "No description available.")}
**Type**: `{option["type"]}`
"""
if option.get("default"):
res += f"""
**Default**:
```nix
{option["default"]["text"] if option.get("default") else "No default set."}
```
"""
example = option.get("example", {}).get("text")
if example:
example_indented = join_lines_with_indentation(example.split("\n"))
res += f"""
???+ example
```nix
{example_indented}
```
"""
if option.get("relatedPackages"):
res += f"""
### Related Packages
{option["relatedPackages"]}
"""
decls = option.get("declarations", [])
source_path, name = replace_store_path(decls[0])
print(source_path, name)
res += f"""
:simple-git: [{name}]({source_path})
"""
res += "\n"
return res
def module_header(module_name: str) -> str:
return f"# {module_name}\n"
def module_usage(module_name: str) -> str:
return f"""## Usage
To use this module, import it like this:
```nix
{{config, lib, inputs, ...}}: {{
imports = [ inputs.clan-core.clanModules.{module_name} ];
# ...
}}
```
"""
clan_core_descr = """ClanCore delivers all the essential features for every clan.
It's always included in your setup, and you can customize your clan's behavior with the configuration [options](#module-options) provided below.
"""
options_head = "\n## Module Options\n"
def produce_clan_core_docs() -> None:
if not CLAN_CORE:
raise ValueError(
f"Environment variables are not set correctly: $CLAN_CORE={CLAN_CORE}"
)
if not OUT:
raise ValueError(f"Environment variables are not set correctly: $out={OUT}")
# A mapping of output file to content
core_outputs: dict[str, str] = {}
with open(CLAN_CORE) as f:
options: dict[str, dict[str, Any]] = json.load(f)
module_name = "clan-core"
for option_name, info in options.items():
outfile = f"{module_name}/index.md"
# Create separate files for nested options
if len(option_name.split(".")) <= 2:
# i.e. clan-core.clanDir
output = core_outputs.get(
outfile,
module_header(module_name) + clan_core_descr + options_head,
)
output += render_option(option_name, info)
# Update the content
core_outputs[outfile] = output
else:
# Clan sub-options
[_, sub] = option_name.split(".")[0:2]
outfile = f"{module_name}/{sub}.md"
# Get the content or write the header
output = core_outputs.get(outfile, render_option_header(sub))
output += render_option(option_name, info)
# Update the content
core_outputs[outfile] = output
for outfile, output in core_outputs.items():
(Path(OUT) / outfile).parent.mkdir(parents=True, exist_ok=True)
with open(Path(OUT) / outfile, "w") as of:
of.write(output)
def produce_clan_modules_docs() -> None:
if not CLAN_MODULES:
raise ValueError(
f"Environment variables are not set correctly: $CLAN_MODULES={CLAN_MODULES}"
)
if not CLAN_MODULES_READMES:
raise ValueError(
f"Environment variables are not set correctly: $CLAN_MODULES_READMES={CLAN_MODULES_READMES}"
)
if not OUT:
raise ValueError(f"Environment variables are not set correctly: $out={OUT}")
with open(CLAN_MODULES) as f:
links: dict[str, str] = json.load(f)
with open(CLAN_MODULES_READMES) as readme:
readme_map: dict[str, str] = json.load(readme)
# {'borgbackup': '/nix/store/hi17dwgy7963ddd4ijh81fv0c9sbh8sw-options.json', ... }
for module_name, options_file in links.items():
with open(Path(options_file) / "share/doc/nixos/options.json") as f:
options: dict[str, dict[str, Any]] = json.load(f)
print(f"Rendering options for {module_name}...")
output = module_header(module_name)
if readme_map.get(module_name, None):
output += f"{readme_map[module_name]}\n"
output += module_usage(module_name)
output += options_head if len(options.items()) else ""
for option_name, info in options.items():
output += render_option(option_name, info)
outfile = Path(OUT) / f"clanModules/{module_name}.md"
outfile.parent.mkdir(
parents=True,
exist_ok=True,
)
with open(outfile, "w") as of:
of.write(output)
if __name__ == "__main__":
produce_clan_core_docs()
produce_clan_modules_docs()

31
docs/nix/shell.nix Normal file
View File

@ -0,0 +1,31 @@
{
docs,
pkgs,
module-docs,
clan-cli-docs,
asciinema-player-js,
asciinema-player-css,
roboto,
fira-code,
...
}:
pkgs.mkShell {
inputsFrom = [ docs ];
shellHook = ''
mkdir -p ./site/reference/cli
cp -af ${module-docs}/* ./site/reference/
cp -af ${clan-cli-docs}/* ./site/reference/cli/
chmod +w ./site/reference/*
echo "Generated API documentation in './site/reference/' "
mkdir -p ./site/static/asciinema-player
ln -snf ${asciinema-player-js} ./site/static/asciinema-player/asciinema-player.min.js
ln -snf ${asciinema-player-css} ./site/static/asciinema-player/asciinema-player.css
# Link to fonts
ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/
ln -snf ${fira-code}/share/fonts/truetype/FiraCode-VF.ttf ./site/static/
'';
}

12
docs/overrides/main.html Normal file
View File

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block extrahead %}
<meta property="og:title" content="Clan - Documentation, Blog & Getting Started Guide" />
<meta property="og:description" content="Documentation for Clan. The peer-to-peer machine deployment framework." />
<meta property="og:image" content="https://clan.lol/static/dark-favicon/128x128.png" />
<meta property="og:url" content="https://docs.clan.lol" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Clan" />
<meta property="og:locale" content="en_US" />
{% endblock %}

View File

@ -1,135 +0,0 @@
# Initializing a New Clan Project
## Create a new flake
1. To start a new project, execute the following command to add the clan cli to your shell:
```shellSession
$ nix shell git+https://git.clan.lol/clan/clan-core
```
2. Then use the following commands to initialize a new clan-flake:
```shellSession
$ clan flake create my-clan
```
This action will generate two primary files: `flake.nix` and `.clan-flake`.
```shellSession
$ ls -la
drwx------ joerg users 5 B a minute ago ./
drwxrwxrwt root root 139 B 12 seconds ago ../
.rw-r--r-- joerg users 77 B a minute ago .clan-flake
.rw-r--r-- joerg users 4.8 KB a minute ago flake.lock
.rw-r--r-- joerg users 242 B a minute ago flake.nix
```
### Understanding the .clan-flake Marker File
The `.clan-flake` marker file serves an optional purpose: it helps the `clan-cli` utility locate the project's root directory.
If `.clan-flake` is missing, `clan-cli` will instead search for other indicators like `.git`, `.hg`, `.svn`, or `flake.nix` to identify the project root.
## What's next
After creating your flake, you can check out how to add [new machines](./machines.md)
---
# Migrating Existing NixOS Configuration Flake
Absolutely, let's break down the migration step by step, explaining each action in detail:
#### Before You Begin
1. **Backup Your Current Configuration**: Always start by making a backup of your current NixOS configuration to ensure you can revert if needed.
```shellSession
$ cp -r /etc/nixos ~/nixos-backup
```
2. **Update Flake Inputs**: Add a new input for the `clan-core` dependency:
```nix
inputs.clan-core = {
url = "git+https://git.clan.lol/clan/clan-core";
# Don't do this if your machines are on nixpkgs stable.
inputs.nixpkgs.follows = "nixpkgs";
};
```
- `url`: Specifies the Git repository URL for Clan Core.
- `inputs.nixpkgs.follows`: Tells Nix to use the same `nixpkgs` input as your main input (in this case, it follows `nixpkgs`).
3. **Update Outputs**: Then modify the `outputs` section of your `flake.nix` to adapt to Clan Core's new provisioning method. The key changes are as follows:
Add `clan-core` to the output
```diff
- outputs = { self, nixpkgs, }:
+ outputs = { self, nixpkgs, clan-core }:
```
Previous configuration:
```nix
{
nixosConfigurations.example-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
[...]
};
}
```
After change:
```nix
let clan = clan-core.lib.buildClan {
# this needs to point at the repository root
directory = self;
specialArgs = {};
clanName = "NEEDS_TO_BE_UNIQUE"; # TODO: Changeme
machines = {
example-desktop = {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
./configuration.nix
];
};
};
};
in { inherit (clan) nixosConfigurations clanInternals; }
```
- `nixosConfigurations`: Defines NixOS configurations, using Clan Cores `buildClan` function to manage the machines.
- Inside `machines`, a new machine configuration is defined (in this case, `example-desktop`).
- Inside `example-desktop` which is the target machine hostname, `nixpkgs.hostPlatform` specifies the host platform as `x86_64-linux`.
- `clanInternals`: Is required to enable evaluation of the secret generation/upload script on every architecture
- `clanName`: Is required and needs to be globally unique, as else we have a cLAN name clash
4. **Rebuild and Switch**: Rebuild your NixOS configuration using the updated flake:
```shellSession
$ sudo nixos-rebuild switch --flake .
```
- This command rebuilds and switches to the new configuration. Make sure to include the `--flake .` argument to use the current directory as the flake source.
5. **Test Configuration**: Before rebooting, verify that your new configuration builds without errors or warnings.
6. **Reboot**: If everything is fine, you can reboot your system to apply the changes:
```shellSession
$ sudo reboot
```
7. **Verify**: After the reboot, confirm that your system is running with the new configuration, and all services and applications are functioning as expected.
By following these steps, you've successfully migrated your NixOS Flake configuration to include the `clan-core` input and adapted the `outputs` section to work with Clan Core's new machine provisioning method.
## What's next
After creating your flake, you can check out how to add [new machines](./machines.md)

View File

@ -1,173 +0,0 @@
# Managing Secrets with Clan
Clan enables encryption of secrets within a Clan flake, ensuring secure sharing among users.
This documentation will guide you through managing secrets with the Clan CLI,
which utilizes the [sops](https://github.com/getsops/sops) format and
integrates with [sops-nix](https://github.com/Mic92/sops-nix) on NixOS machines.
## 1. Generating Keys and Creating Secrets
To begin, generate a key pair:
```shellSession
$ clan secrets key generate
```
**Output**:
```
Public key: age1wkth7uhpkl555g40t8hjsysr20drq286netu8zptw50lmqz7j95sw2t3l7
Generated age private key at '/home/joerg/.config/sops/age/keys.txt' for your user.
Generated age private key at '/home/joerg/.config/sops/age/keys.txt' for your user. Please back it up on a secure location or you will lose access to your secrets.
Also add your age public key to the repository with 'clan secrets users add youruser age1wkth7uhpkl555g40t8hjsysr20drq286netu8zptw50lmqz7j95sw2t3l7' (replace you
user with your user name)
```
⚠️ **Important**: Backup the generated private key securely, or risk losing access to your secrets.
Next, add your public key to the Clan flake repository:
```shellSession
$ clan secrets users add <your_username> <your_public_key>
```
Doing so creates this structure in your Clan flake:
```
sops/
└── users/
└── <your_username>/
└── key.json
```
Now, to set your first secret:
```shellSession
$ clan secrets set mysecret
Paste your secret:
```
Note: As you type your secret, keypresses won't be displayed. Press Enter to save the secret.
Retrieve the stored secret:
```shellSession
$ clan secrets get mysecret
```
And list all secrets like this:
```shellSession
$ clan secrets list
```
Secrets in the repository follow this structure:
```
sops/
├── secrets/
│ └── <secret_name>/
│ ├── secret
│ └── users/
│ └── <your_username>/
```
The content of the secret is stored encrypted inside the `secret` file under `mysecret`.
By default, secrets are encrypted with your key to ensure readability.
## 2. Adding Machine Keys
New machines in Clan come with age keys stored in `./sops/machines/<machine_name>`. To list these machines:
```shellSession
$ clan secrets machines list
```
For existing machines, add their keys:
```shellSession
$ clan secrets machines add <machine_name> <age_key>
```
To fetch an age key from an SSH host key:
```shellSession
$ ssh-keyscan <domain_name> | nix shell nixpkgs#ssh-to-age -c ssh-to-age
```
## 3. Assigning Access
By default, secrets are encrypted for your key. To specify which users and machines can access a secret:
```shellSession
$ clan secrets set --machine <machine1> --machine <machine2> --user <user1> --user <user2> <secret_name>
```
You can add machines/users to existing secrets without modifying the secret:
```shellSession
$ clan secrets machines add-secret <machine_name> <secret_name>
```
## 4. Utilizing Groups
For convenience, Clan CLI allows group creation to simplify access management. Here's how:
1. **Creating Groups**:
Assign users to a new group, e.g., `admins`:
```shellSession
$ clan secrets groups add admins <username>
```
2. **Listing Groups**:
```shellSession
$ clan secrets groups list
```
3. **Assigning Secrets to Groups**:
```shellSession
$ clan secrets groups add-secret <group_name> <secret_name>
```
# NixOS integration
A NixOS machine will automatically import all secrets that are encrypted for the
current machine. At runtime it will use the host key to decrypt all secrets into
a in-memory, non-persistent filesystem using
[sops-nix](https://github.com/Mic92/sops-nix). In your nixos configuration you
can get a path to secrets like this `config.sops.secrets.<name>.path`. Example:
```nix
{ config, ...}: {
sops.secrets.my-password.neededForUsers = true;
users.users.mic92 = {
isNormalUser = true;
passwordFile = config.sops.secrets.my-password.path;
};
}
```
See the [readme](https://github.com/Mic92/sops-nix) of sops-nix for more
examples.
# Importing existing sops-based keys / sops-nix
`clan secrets` stores each secrets in a single file, whereas [sops](https://github.com/Mic92/sops-nix)
commonly allows to put all secrets in a yaml or json documents.
If you already happend to use sops-nix, you can migrate by using the `clan secrets import-sops` command by importing these documents:
```shellSession
% clan secrets import-sops --prefix matchbox- --group admins --machine matchbox nixos/matchbox/secrets/secrets.yaml
```
This will create secrets for each secret found in `nixos/matchbox/secrets/secrets.yaml` in a ./sops folder of your repository.
Each member of the group `admins` will be able
Since our clan secret module will auto-import secrets that are encrypted for a particular nixos machine,
you can now remove `sops.secrets.<secrets> = { };` unless you need to specify more options for the secret like owner/group of the secret file.

View File

@ -0,0 +1,26 @@
authors:
DavHau:
name: "DavHau"
description: "Core Developer"
avatar: "https://clan.lol/static/profiles/davhau.jpg"
url: "https://DavHau.com"
Lassulus:
name: "Lassulus"
description: "Core Developer"
avatar: "https://clan.lol/static/profiles/lassulus.jpg"
url: "https://http://lassul.us/"
Mic92:
name: "Mic92"
description: "Core Developer"
avatar: "https://clan.lol/static/profiles/mic92.jpg"
url: "https://thalheim.io"
W:
name: "W"
description: "Founder of Clan"
avatar: "https://clan.lol/static/profiles/w_profile.webp"
url: ""
Qubasa:
name: "Qubasa"
description: "Core Developer"
avatar: "https://clan.lol/static/profiles/qubasa.png"
url: "https://github.com/Qubasa"

2
docs/site/blog/index.md Normal file
View File

@ -0,0 +1,2 @@
# Blog

View File

@ -0,0 +1,72 @@
---
title: "Introducing Clan: Full-Stack Computing Redefined"
description: "Introducing Clan, a new model for a decentralized network, designed to provide families, smaller groups, and small businesses a platform thats private, secure, and user-friendly."
authors:
- W
- Qubasa
date: 2024-03-19
---
In a digital age where users are guided increasingly toward submission and dependence, Clan reclaims computing and networking from the ground up.
Clan enables users to build any system from a git repository, automate secret handling, and join devices in a secure darknet. This control extends beyond applications to communication protocols and the operating system itself, putting you fully in charge of your own digital environment.
## Why We're Building Clan
Our mission is simple: to restore fun, freedom, and functionality to computing as an open source project. We believe in building tools that empower users, foster innovation, and challenge the limitations imposed by outdated paradigms. Clan, in its essence, is an open source endeavor; it's our contribution to a future where technology serves humanity, not the other way around.
## How Clan Changes the Game
Clan embodies a new philosophy in system, application, and network design. It enables seamless, secure communication across devices, simplifies software distribution and updates, and offers both public and private network configurations. Here are some of the ways it accomplishes this:
- **Nix as a Foundation:** Imagine a safety net for your computer's operating system, one that lets you make changes or updates without the fear of causing a crash or losing data. Nix simplifies the complexities of system design, ensuring that updates are safe and systems are more reliable.
- **Simplified System Deployment:** Building and managing a computer system, from the operating system to the software you use, often feels like putting together a complex puzzle. With Clan, the puzzle pieces are replaced by a set of building blocks. Leveraging the power of Nix and Clan's innovative toolkit, anyone from tech-savvy administrators to everyday users can create and maintain what we call "full-stack systems" (everything your computer needs to run smoothly).
- **A Leap in Connectivity:** Imagine if you could create private, secure pathways between your devices, bypassing the noisy and often insecure internet. Clan makes this possible through something called "overlay networks." These networks are like private tunnels, allowing your devices to talk to each other securely and directly. With Clan's built-in overlay networks and automatically configured services, connecting your devices becomes seamless, secure, and hassle-free.
- **Security Through Separation:** Clan employs sandboxing and virtual machines, a technology that runs code in isolated environments - so even if you explore new Clans, your system remains protected from potential threats.
- **Reliable:** With Clan, your data and services are preserved for the long haul. We focus on self-hosted backups and integration with the [Fediverse](https://de.wikipedia.org/wiki/Fediverse), a network of interconnected, independent online communities, so your digital life remains uninterrupted and under your control.
## A Glimpse at Clan's Features
- **Social Scaling:** Choose between creating a private sanctuary for your closest contacts, a dynamic space for a self-contained community, or embracing the open web with public Clans anyone can join.
{{ video(name="show_join.webm")}}
- **Seamless VM Integration:** Applications running in virtual machines can appear and behave as if they're part of your main operating system — a blend of power and simplicity.
{{ video(name="show_run.webm")}}
- **Robust Backup Management:** Keep your data safe _forever_ - never worry about cloud services disappearing in 10 years.
{{ asciinema(name="backups.cast") }}
- **Intuitive Secret Management:** Clan simplifies digital security by automating the creation and management of encryption keys and passwords for your services.
{{ asciinema(name="secrets.cast") }}
- **Remote Install:** Set up and manage Clan systems anywhere in the world with just a QR scan or SSH access, making remote installations as easy as snapping a photo or sharing a link.
{{ asciinema(name="nixos-install.cast") }}
## Who Stands to Benefit?
Clan is for anyone and everyone who believes in the power of open source technology to connect, empower, and protect. From system administrators to less tech-savvy individuals, small business owners to privacy-conscious users, Clan offers something for everyone — a way to reclaim control and redefine how we interact with technology.
## Join the Revolution
Ready to control your digital world? Clan is more than a tool—it's a movement. Secure your data, manage your systems easily, or connect with others how you like. Start with Clan for a better digital future.
Connect with us on our [Matrix channel at clan.lol](https://matrix.to/#/#clan:lassul.us) or through our IRC bridges (coming soon).
Want to see the code? Check it out [on our Gitea](https://git.clan.lol/clan/clan-core) or [on GitHub](https://github.com/clan-lol/clan-core).
Or follow our [RSS feed](https://docs.clan.lol/feed_rss_created.xml)!
Join us and be part of changing technology for the better, together.

View File

@ -0,0 +1,194 @@
---
title: "Dev Report: Introducing the NixOS to JSON Schema Converter"
description: "Discover our new library designed to extract JSON schema interfaces from NixOS modules, streamlining frontend development"
authors:
- DavHau
date: 2024-05-25
slug: jsonschema-converter
---
## Overview
Weve developed a new library designed to extract interfaces from NixOS modules and convert them into JSON schemas, paving the way for effortless GUI generation. This blog post outlines the motivations behind this development, demonstrates the capabilities of the library, and guides you through leveraging it to create GUIs seamlessly.
## Motivation
In recent months, our team has been exploring various graphical user interfaces (GUIs) to streamline NixOS machine configuration. While our opinionated Clan modules simplify NixOS configurations, there's a need to configure these modules from diverse frontends, such as:
- Command-line interfaces (CLIs)
- Web-based UIs
- Desktop applications
- Mobile applications
- Large Language Models (LLMs)
Given this need, a universal format like JSON is a natural choice. It is already possible as of now, to import json based NixOS configurations, as illustrated below:
`configuration.json`:
```json
{ "networking": { "hostName": "my-machine" } }
```
This configuration can be then imported inside a classic NixOS config:
```nix
{config, lib, pkgs, ...}: {
imports = [
(lib.importJSON ./configuration.json)
];
}
```
This straightforward approach allows us to build a frontend that generates JSON, enabling the configuration of NixOS machines. But, two critical questions arise:
1. How does the frontend learn about existing configuration options?
2. How can it verify user input without running Nix?
Introducing [JSON schema](https://json-schema.org/), a widely supported standard that defines interfaces in JSON and validates input against them.
Example schema for `networking.hostName`:
```json
{
"type": "object",
"properties": {
"networking": {
"type": "object",
"properties": {
"hostName": {
"type": "string",
"pattern": "^$|^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$"
}
}
}
}
}
```
## Client-Side Input Validation
Validating input against JSON schemas is both efficient and well-supported across numerous programming languages. Using JSON schema validators, you can accurately check configurations like our `configuration.json`.
Validation example:
```shell
$ nix-shell -p check-jsonschema
$ jsonschema -o pretty ./schema.json -i ./configuration.json
===[SUCCESS]===(./configuration.json)===
```
In case of invalid input, schema validators provide explicit error messages:
```shell
$ echo '{ "networking": { "hostName": "my/machine" } }' > configuration.json
$ jsonschema -o pretty ./schema.json -i ./configuration.json
===[ValidationError]===(./configuration.json)===
'my/machine' does not match '^$|^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$'
Failed validating 'pattern' in schema['properties']['networking']['properties']['hostName']:
{'pattern': '^$|^[a-z0-9]([a-z0-9_-]{0,61}[a-z0-9])?$',
'type': 'string'}
On instance['networking']['hostName']:
'my/machine'
```
## Automatic GUI Generation
Certain libraries facilitate straightforward GUI generation from JSON schemas. For instance, the [react-jsonschema-form playground](https://rjsf-team.github.io/react-jsonschema-form/) auto-generates a form for any given schema.
## NixOS Module to JSON Schema Converter
To enable the development of responsive frontends, our library allows the extraction of interfaces from NixOS modules to JSON schemas. Open-sourced for community collaboration, this library supports building sophisticated user interfaces for NixOS.
Heres a preview of our library's functions exposed through the [clan-core](https://git.clan.lol/clan/clan-core) flake:
- `lib.jsonschema.parseModule` - Generates a schema for a NixOS module.
- `lib.jsonschema.parseOption` - Generates a schema for a single NixOS option.
- `lib.jsonschema.parseOptions` - Generates a schema from an attrset of NixOS options.
Example:
`module.nix`:
```nix
{lib, config, pkgs, ...}: {
# a simple service with two options
options.services.example-web-service = {
enable = lib.mkEnableOption "Example web service";
port = lib.mkOption {
type = lib.types.int;
description = "Port used to serve the content";
};
};
}
```
Converted, using the `parseModule` function:
```shell
$ cd clan-core
$ nix eval --json --impure --expr \
'(import ./lib/jsonschema {}).parseModule ./module.nix' | jq | head
{
"properties": {
"services": {
"properties": {
"example-web-service": {
"properties": {
"enable": {
"default": false,
"description": "Whether to enable Example web service.",
"examples": [
...
```
This utility can also generate interfaces for existing NixOS modules or options.
## GUI for NGINX in Under a Minute
Creating a prototype GUI for the NGINX module using our library and [react-jsonschema-form playground](https://rjsf-team.github.io/react-jsonschema-form/) can be done quickly:
1. Export all NGINX options into a JSON schema using a Nix expression:
```nix
# export.nix
let
pkgs = import <nixpkgs> {};
clan-core = builtins.getFlake "git+https://git.clan.lol/clan/clan-core";
options = (pkgs.nixos {}).options.services.nginx;
in
clan-core.lib.jsonschema.parseOption options
```
2. Write the schema into a file:
```shell
$ nix eval --json -f ./export.nix | jq > nginx.json
```
3. Open the [react-jsonschema-form playground](https://rjsf-team.github.io/react-jsonschema-form/), select `Blank` and paste the `nginx.json` contents.
This provides a quick look at a potential GUI (screenshot is cropped).
![Image title](https://clan.lol/static/blog-post-jsonschema/nginx-gui.jpg)
## Limitations
### Laziness
JSON schema mandates the declaration of all required fields upfront, which might be configured implicitly or remain unused. For instance, `services.nginx.virtualHosts.<name>.sslCertificate` must be specified even if SSL isnt enabled.
### Limited Types
Certain NixOS module types, like `types.functionTo` and `types.package`, do not map straightforwardly to JSON. For full compatibility, adjustments to NixOS modules might be necessary, such as substituting `listOf package` with `listOf str`.
### Parsing NixOS Modules
Currently, our converter relies on the `options` attribute of evaluated NixOS modules, extracting information from the `type.name` attribute, which is suboptimal. Enhanced introspection capabilities within the NixOS module system would be beneficial.
## Future Prospects
We hope these experiments inspire the community, encourage contributions and further development in this space. Share your ideas and contributions through our issue tracker or matrix channel!
## Links
- [Comments on NixOS Discourse](https://discourse.nixos.org/t/introducing-the-nixos-to-json-schema-converter/45948)
- [Source Code of the JSON Schema Library](https://git.clan.lol/clan/clan-core/src/branch/main/lib/jsonschema)
- [Our Issue Tracker](https://git.clan.lol/clan/clan-core/issues)
- [Our Matrix Channel](https://matrix.to/#/#clan:lassul.us)
- [react-jsonschema-form Playground](https://rjsf-team.github.io/react-jsonschema-form/)

Some files were not shown because too many files have changed in this diff Show More