Compare commits

...

819 Commits

Author SHA1 Message Date
Johannes Kirschbauer
9fa017bc7b Docs: init empty migration guide with references 2025-05-12 22:26:35 +02:00
Johannes Kirschbauer
c25910c796 Feat: print better error if module was migrated 2025-05-12 22:26:35 +02:00
Johannes Kirschbauer
0d417bf098 Fix: update test and docs 2025-05-12 22:26:35 +02:00
pinpox
7609a9d0d7 Remove admin UI interface 2025-05-12 22:26:35 +02:00
pinpox
9b1a4e8219 migrate admin module 2025-05-12 22:26:35 +02:00
Mic92
ef4b5cc9d5 Merge pull request 'checks/mumble: make delays between keyboard clicks more robust' (#3578) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3578
2025-05-12 13:39:21 +00:00
Jörg Thalheim
bea10f7bc8 checks/mumble: disable on x86_64-linux for now 2025-05-12 15:32:52 +02:00
Jörg Thalheim
e8608ac830 checks/mumble: make delays between keyboard clicks more robust 2025-05-12 15:10:29 +02:00
kenji
2ecedb6535 Merge pull request 'clan/vars: Fix vars help hyperlink' (#3577) from kenji/clan-core:ke-docs-vars-cli into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3577
2025-05-12 13:08:13 +00:00
a-kenji
96fb6c39f4 clan/vars: Fix vars help hyperlink 2025-05-12 14:55:34 +02:00
hsjobeki
6e26d31ac6 Merge pull request 'Refactor(inventory/constraints): use explizit dependency injections instead of specialArgs' (#3553) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3553
2025-05-12 12:26:45 +00:00
Johannes Kirschbauer
77ec1e9e48 Feat(inventory/manifest): vendor {description, categories} from 'clanModules' 2025-05-12 14:19:04 +02:00
renovate[bot]
ea8b1aa34c chore(deps): lock file maintenance 2025-05-12 14:05:14 +02:00
Mic92
2bd9141d2d Merge pull request 'pinned-clan-core' (#3574) from pinned-clan-core into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3574
2025-05-12 12:02:58 +00:00
Jörg Thalheim
f788313e97 morph: don't depend on clan-core 2025-05-12 13:56:10 +02:00
Jörg Thalheim
89b70ffa6f checks/backup: depend on pinned clan core 2025-05-12 13:52:21 +02:00
Mic92
ed1692574f Merge pull request 'ci/update-clan-core-for-checks: bump gitea-create-pull-request' (#3573) from bump-update-flake into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3573
2025-05-12 11:46:01 +00:00
Jörg Thalheim
1106c50924 ci/update-clan-core-for-checks: bump gitea-create-pull-request 2025-05-12 13:41:16 +02:00
Mic92
e99e47da10 Merge pull request 'use a clan-core snapshots for ci tests' (#3572) from misc-fixes-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3572
2025-05-12 11:26:31 +00:00
Jörg Thalheim
67def050fd use a clan-core snapshots for ci tests
We currently have to re-run our integration tests a lot because they are
depending on the whole repository. This pull request changes locks the
clan-core used for vm tests. This has the caveat that we might not run
the latest NixOS machine of our profiles. On the upside we can test
behaviour against an older clan-core version and capture breakages and
make it backwards compatible. If we actually want to test the latest
version, the PR that changes the exposed flake api, could also bump the
clan-core snapshot.
2025-05-12 13:21:25 +02:00
Jörg Thalheim
c0d2787dee docs/testing: update to latest api 2025-05-12 13:03:06 +02:00
Mic92
ecc327277c Merge pull request 'Data-mesher: don't set owner for public vars' (#3571) from misc-fixes-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3571
2025-05-12 10:27:05 +00:00
Mic92
0064a8bfbc Merge pull request 'Add /bin/sh to bubblewrap sandbox' (#3551) from jfly/clan-core:bin-sh-in-sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3551
2025-05-12 10:07:56 +00:00
Jörg Thalheim
1e8b9def2a data-mesher: don't set owner for public_key 2025-05-12 12:06:05 +02:00
Jörg Thalheim
f0983ede5e move single dont-depend-on-repo-root check into checks
Doesn't seem to be a pattern yet with a single check.
2025-05-12 12:06:05 +02:00
Jörg Thalheim
10bc9e3e44 vars: improve warnings for non-public secrets 2025-05-12 12:06:05 +02:00
DavHau
556fd8845e Merge pull request 'GUI/machines: enable grid view by default' (#3570) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3570
2025-05-12 08:52:03 +00:00
DavHau
fab079af71 GUI/machines: enable grid view by default 2025-05-12 15:41:31 +07:00
DavHau
0370c1cf02 Merge pull request 'vars: cleanup sops file module' (#3569) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3569
2025-05-12 08:40:35 +00:00
DavHau
aa557f3a96 vars: cleanup sops file module 2025-05-12 15:30:23 +07:00
DavHau
e8699e68b5 Merge pull request 'gui/vars: fix vars screen doesn't appear on update' (#3567) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3567
2025-05-12 07:23:51 +00:00
hsjobeki
f8f31d430d Merge pull request 'Docs: update 'clan.service' examples' (#3568) from hsjobeki/clan-core:docs-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3568
2025-05-12 07:23:41 +00:00
DavHau
3d345e0bca gui/vars: fix vars screen doesn't appear on update 2025-05-12 13:52:16 +07:00
Michael Hoang
80711fcf72 Merge pull request 'cli: allow age-plugin-1p' (#3565) from push-uzmrpnklrmxw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3565
2025-05-12 06:47:42 +00:00
Michael Hoang
35684090e3 cli: allow age-plugin-1p 2025-05-12 16:36:24 +10:00
renovate[bot]
8069b137f3 chore(deps): update data-mesher digest to 2666bb1 2025-05-12 00:50:11 +00:00
renovate[bot]
2fba6b15e8 chore(deps): update data-mesher digest to 20e20ac 2025-05-11 22:30:11 +00:00
renovate[bot]
cddee0ca86 chore(deps): update data-mesher digest to 61da4b5 2025-05-11 19:30:10 +00:00
renovate[bot]
0f3ab641d9 chore(deps): update treefmt-nix digest to 708ec80 2025-05-11 19:00:11 +00:00
Johannes Kirschbauer
d5f90b2730 Docs: update 'clan.service' examples 2025-05-11 15:46:16 +02:00
renovate[bot]
54335221d8 chore(deps): update data-mesher digest to f664c98 2025-05-11 11:30:21 +00:00
renovate[bot]
76b13476a5 chore(deps): update treefmt-nix digest to 4819332 2025-05-11 11:10:10 +00:00
Johannes Kirschbauer
bbed94d6de Refactor(inventory/manifest): move into seperate file 2025-05-10 13:58:21 +02:00
Johannes Kirschbauer
23a5c845b0 Refactor(inventory/constraints): use explizit dependency injections instead of specialArgs 2025-05-10 13:42:47 +02:00
Michael Hoang
b933dcf2e2 Merge pull request 'cli: fix machines update not outputting stdout of nixos-rebuild' (#3552) from push-zmlxvwnvrpuk into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3552
2025-05-10 07:15:23 +00:00
Michael Hoang
8a755fff8c cli: fix machines update not outputting stdout of nixos-rebuild 2025-05-10 17:02:56 +10:00
Jeremy Fleischman
5726dd1010 Add /bin/sh to bubblewrap sandbox
I ran into this error when trying to run `opendkim-genkey` in a vars
generator:

```console
=========================================================================== Command ===========================================================================
nix \
    --extra-experimental-features 'nix-command flakes' \
    shell \
    --inputs-from /nix/store/9r3ddw80dz4qzci9pj57ppbh6gy2pgv9-clan-cli/lib/python3.12/site-packages/clan_cli/nixpkgs \
    'nixpkgs#bash' \
    'nixpkgs#bubblewrap' \
    -c bwrap \
    --unshare-all --tmpfs \
    / \
    --ro-bind /nix/store \
    /nix/store \
    --dev /dev \
    --bind /tmp/nix-shell.ClOjgJ/vars-kh4qrnas \
    /tmp/nix-shell.ClOjgJ/vars-kh4qrnas \
    --chdir / \
    --bind /proc \
    /proc \
    --uid 1000 \
    --gid 1000 \
    -- bash \
    -c /nix/store/p0089w4y1w3h535g7ipv4jl4r6mb2hs2-generator-dkim-playground.jflei.com.mail

=========================================================================== Stderr ============================================================================
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = (unset),
	LC_NUMERIC = (unset),
	LC_COLLATE = (unset),
	LC_TIME = (unset),
	LC_MESSAGES = (unset),
	LC_MONETARY = (unset),
	LC_ADDRESS = (unset),
	LC_IDENTIFICATION = (unset),
	LC_MEASUREMENT = (unset),
	LC_PAPER = (unset),
	LC_TELEPHONE = (unset),
	LC_NAME = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't exec "/bin/sh": No such file or directory at /nix/store/nfawbww80p1hgpymfgq1vq8wqlak75yh-opendkim-2.11.0-Beta2/sbin/.opendkim-genkey-wrapped line 139.
.opendkim-genkey-wrapped: openssl died with signal %d
127
Return Code: 1

1 hosts failed with an error. Check the logs above
```

As we allow `/bin/sh` in the nix build sandbox, I assume we're OK
allowing it here as well?
2025-05-09 18:33:08 -07:00
Luis Hebendanz
b306c748b8 Merge pull request 'clan-cli: Use machine object everywhere instead of name + flake' (#3541) from Qubasa/clan-core:replace_machine_name_with_machine_obj2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3541
2025-05-09 14:01:25 +00:00
Qubasa
2682581c09 clan-cli: Use machine object everywhere instead of name + flake 2025-05-09 13:13:14 +02:00
renovate[bot]
a0a5827157 chore(deps): update disko digest to 85555d2 2025-05-08 18:40:10 +00:00
hsjobeki
8638861a87 Merge pull request 'Refactor(inventory/modules): add support for local clan.modules and migrate all checks' (#3547) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3547
2025-05-08 15:50:26 +00:00
Johannes Kirschbauer
c5a28e2655 fix: make sure legacyModules dont end up in localModules for inventory.instances 2025-05-08 17:38:28 +02:00
Johannes Kirschbauer
0af36d0a4d Refactor(inventory/modules): add support for local clan.modules and migrate all checks 2025-05-08 17:17:46 +02:00
Mic92
34b63ca1d5 Merge pull request 'chore(deps): update nix-darwin digest to 6cb36e8' (#3544) from renovate/nix-darwin-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3544
2025-05-08 14:49:18 +00:00
renovate[bot]
e24a6e23ad chore(deps): update nix-darwin digest to 6cb36e8 2025-05-08 14:40:13 +00:00
Mic92
fd7ccaca1a Merge pull request 'clan evaluation warnings for clan.inventory.modules' (#3546) from improve-container into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3546
2025-05-08 14:38:13 +00:00
Jörg Thalheim
4251d5ee0b clan evaluation warnings for clan.inventory.modules 2025-05-08 16:29:23 +02:00
Mic92
0a8839bcc0 Merge pull request 'Prettify nspawn output' (#3545) from improve-container into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3545
2025-05-08 14:28:35 +00:00
pinpox
cb41aaafa1 Prettify nspawn output 2025-05-08 16:20:29 +02:00
Qubasa
9867b6a894 clan-cli: Fix clan not finding vendored packages when running from git repo 2025-05-08 12:31:21 +02:00
Qubasa
7459566c2b clan-cli: remove useless run_no_stdout function 2025-05-08 12:30:16 +02:00
renovate[bot]
1c08d6dd25 chore(deps): update disko digest to 6bb82b7 2025-05-08 09:30:10 +00:00
renovate[bot]
14f4d65c47 chore(deps): update disko digest to c4fe2d1 2025-05-08 02:50:10 +00:00
renovate[bot]
43159cc2f0 chore(deps): update disko digest to 78d6a13 2025-05-07 18:10:11 +00:00
hsjobeki
9d8ebfd267 Merge pull request 'chore: deprecate usage of inventory.modules in favor of clan.modules' (#3314) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3314
2025-05-07 17:21:19 +00:00
Johannes Kirschbauer
1e379f6fa7 chore: deprecate usage of inventory.modules in favor of clan.modules 2025-05-07 19:12:07 +02:00
Mic92
b32a7749cf Merge pull request 'clan-cli: Refactor the API to use the Flake object' (#3539) from Qubasa/clan-core:Qubasa-replace_machine_name_with_machine_obj into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3539
2025-05-07 16:57:32 +00:00
Qubasa
153da50d6f clan-cli: Refactor the API to use the Flake object 2025-05-07 16:43:50 +00:00
hsjobeki
dd3bb314fd Merge pull request 'Feat(modules): display clan.service modules' (#3537) from hsjobeki/clan-core:module-list into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3537
2025-05-07 15:33:49 +00:00
Mic92
687f26eef1 Merge pull request 'chore(deps): update data-mesher digest to 4347dfb' (#3538) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3538
2025-05-07 14:53:57 +00:00
Johannes Kirschbauer
afdb08643d fix(tests/modules): list_modules returns moduleSets" 2025-05-07 16:46:13 +02:00
renovate[bot]
0946d4316e chore(deps): update data-mesher digest to 4347dfb 2025-05-07 16:42:17 +02:00
hsjobeki
462c0764b9 Merge pull request 'feat(UI): design fixups in {machineList, machineItem, machineDetails, sidebar, sidebarHeader, button, sidebar}' (#3528) from amunsen/clan-core:ui-improvements into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3528
2025-05-07 14:23:49 +00:00
Timo
a748a27ddc fixes after npm run check 2025-05-07 16:12:35 +02:00
Johannes Kirschbauer
baf686e83f Feat(modules): display clan.service modules 2025-05-07 16:03:39 +02:00
Timo
03ddce83b7 machine-list:loading skeleton 2025-05-07 15:31:44 +02:00
Timo
45eb73680d sidebar-header: updates design 2025-05-07 15:31:44 +02:00
Timo
7d39d49b30 flash install: fixes form layout 2025-05-07 15:31:42 +02:00
Timo
698a39fafb tailwind: updates color values 2025-05-07 15:30:37 +02:00
Timo
b633db4f8e machine-details: updates form layout 2025-05-07 15:30:01 +02:00
Timo
7b9d18f9eb machine-item: adds border to thumb 2025-05-07 15:28:44 +02:00
Timo
51950329a3 machine-item: updates design and unifies 2025-05-07 15:28:44 +02:00
Timo
16256440e6 button component: introduces button-ghost dedicated styles 2025-05-07 15:28:44 +02:00
Timo
dfbb860898 sidebar component: removes pseudo marker 2025-05-07 15:28:44 +02:00
Jörg Thalheim
444fc3f820 Revert "Merge pull request 'clan-cli: Refactor the API to use the Flake object' (#3531) from Qubasa/clan-core:replace_machine_name_with_machine_obj into main"
This reverts commit 572ce8885f, reversing
changes made to 0bee027251.
2025-05-07 15:24:57 +02:00
Mic92
572ce8885f Merge pull request 'clan-cli: Refactor the API to use the Flake object' (#3531) from Qubasa/clan-core:replace_machine_name_with_machine_obj into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3531
2025-05-07 13:21:13 +00:00
Mic92
0bee027251 Merge pull request 'Flake: remove unused variable and mark other fields as non-init' (#3535) from cleanup-flake into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3535
2025-05-07 13:20:10 +00:00
Mic92
334367c3f7 Merge pull request 'chore(deps): update data-mesher digest to a454b9f' (#3532) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3532
2025-05-07 13:18:25 +00:00
renovate[bot]
2371a5fa78 chore(deps): update data-mesher digest to a454b9f 2025-05-07 13:00:09 +00:00
Mic92
4792d8b1e3 Merge pull request 'Fix debug command to attach to container' (#3534) from container-debug into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3534
2025-05-07 12:56:33 +00:00
pinpox
ace0328a14 Fix debug command to attach to container 2025-05-07 14:41:18 +02:00
Jörg Thalheim
66c2d54961 Flake: remove unused variable and mark other fields as non-init 2025-05-07 14:40:22 +02:00
renovate[bot]
e18efdd48f Update data-mesher digest to c14644b 2025-05-07 11:20:09 +00:00
DavHau
8b652866c7 Merge pull request 'GUI: initialize support for vars prompts' (#3529) from DavHau/clan-core:gui-prompts into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3529
2025-05-07 11:15:32 +00:00
Qubasa
7129c38675 clan-cli: Refactor the API to use the Flake object 2025-05-07 13:12:48 +02:00
DavHau
caacf65dc0 GUI: initialize support for vars prompts
... for now only when updating a machine (not when installing)

Whenever the user clicks on the update button in the machine view, and only if user input is needed for some missing vars, the user will be forwarded to a vars page.
2025-05-07 18:06:35 +07:00
kenji
f8723ab897 Merge pull request 'vars/interface: Fix typo' (#3522) from kenji/clan-core:ke-vars-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3522
2025-05-06 19:48:08 +00:00
a-kenji
b877df4c6e vars/interface: Fix typo 2025-05-06 19:48:08 +00:00
kenji
bf04eabc21 Merge pull request 'container-test-driver: Fix test naming' (#3521) from kenji/clan-core:ke-vmctn into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3521
2025-05-06 19:47:53 +00:00
a-kenji
5149ed9318 container-test-driver: Fix test naming
Fix the container test naming, as this otherwise can be very confusing.
2025-05-06 19:47:53 +00:00
hsjobeki
4d84180dd9 Merge pull request 'api-1' (#3524) from hsjobeki/clan-core:api-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3524
2025-05-06 17:08:02 +00:00
hsjobeki
7571fdef74 Merge pull request 'Refactor(machine/class): use frozen dataclass for class 'machine'' (#3520) from hsjobeki/clan-core:api-cleanup-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3520
2025-05-06 17:07:51 +00:00
Johannes Kirschbauer
7d55511d6f fix(services): features.API set to true and readOnly 2025-05-06 18:58:40 +02:00
Johannes Kirschbauer
cbd7157cfc feat(modules): derive module list from inputs and local modules 2025-05-06 18:57:54 +02:00
kenji
25faba4795 Merge pull request 'adr/2: Fix typo' (#3523) from kenji/clan-core:ke-adr-fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3523
2025-05-06 16:33:19 +00:00
a-kenji
0f0bab7976 adr/2: Fix typo 2025-05-06 18:23:45 +02:00
hsjobeki
f0e18bbdfb Merge pull request 'Refactor(machine/install): don't mutate the machine class during installation' (#3519) from hsjobeki/clan-core:api-cleanup-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3519
2025-05-06 15:21:21 +00:00
Johannes Kirschbauer
6d4db71ea3 Refactor(machine/class): use frozen dataclass for class 'machine' 2025-05-06 17:12:52 +02:00
Johannes Kirschbauer
b21c98db7f Refactor(machine/install): don't mutate the machine class during installation 2025-05-06 17:09:37 +02:00
hsjobeki
df3fe00b8a Merge pull request 'Refactor(machine/update): cleanup dataflow and logic conditions to be intuitive' (#3518) from hsjobeki/clan-core:api-cleanup-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3518
2025-05-06 15:02:05 +00:00
Johannes Kirschbauer
7371085c05 Refactor(machine/update): cleanup dataflow and logic conditions to be intuitive 2025-05-06 16:49:32 +02:00
Mic92
6804327bca Merge pull request 'Host: actual setup ssh controlmaster' (#3515) from fix-control-master into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3515
2025-05-06 11:21:05 +00:00
Jörg Thalheim
ec76d5f8e5 only apply ssh control master to local ssh connection 2025-05-06 13:11:30 +02:00
Jörg Thalheim
864cdf33a7 Host: actual setup ssh controlmaster
before we were not entering the context manager
2025-05-06 13:11:30 +02:00
Mic92
e6dbccd8e5 Merge pull request 'Add CODEOWNERS and tag @lopter as a reviewer on vars and secrets changes' (#3508) from lopter/clan-core:lo-vars-codeowner into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3508
2025-05-06 10:48:46 +00:00
hsjobeki
30ac51b313 Merge pull request 'chore(API): cleanup remove unnused functions' (#3516) from hsjobeki/clan-core:api-cleanup-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3516
2025-05-06 10:42:37 +00:00
Johannes Kirschbauer
00b12c2c51 chore(API): cleanup remove unnused functions 2025-05-06 12:29:11 +02:00
kenji
085d726217 Merge pull request 'container-test-driver/nsenter: Improve printing of command' (#3514) from kenji/clan-core:ke-nsenter-pprint into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3514
2025-05-06 10:11:20 +00:00
a-kenji
3e65a76dfe container-test-driver/nsenter: Improve printing of command
Improves printing of `nsenter` command, so that it can easier be copied.
2025-05-06 10:11:20 +00:00
Mic92
929632049e Merge pull request 'fix clan machines update with build-host' (#3512) from build-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3512
2025-05-06 09:56:48 +00:00
Jörg Thalheim
0d1e642dfd fix build_host set if it doesn't exist 2025-05-06 09:56:58 +02:00
Mic92
8af68cbd9d Merge pull request 'fix incorrect target host when build host is set' (#3511) from ssh-foo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3511
2025-05-06 07:54:40 +00:00
Jörg Thalheim
a44fee9eab fix incorrect target host when build host is set 2025-05-06 09:54:08 +02:00
Mic92
b27f34aed3 Merge pull request 'decisions: propose an ADR to formalize the ADR numbering process' (#3507) from lopter/clan-core:lo-adr-numbering-process into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3507
2025-05-06 07:32:41 +00:00
Jörg Thalheim
cd23c9ff41 fix incorrect target host when build host is set 2025-05-06 09:26:59 +02:00
Louis Opter
852a673839 Add CODEOWNERS and tag @lopter as a reviewer on vars and secrets changes
Since I am working in those areas through [ADR-7], I would like to know
when they get changed, and possibly have a say.

[ADR-7]: https://git.clan.lol/clan/clan-core/pulls/3196
2025-05-05 23:40:11 +00:00
Louis Opter
763a403e9f decisions: propose an ADR to formalize the ADR numbering process 2025-05-05 23:22:31 +00:00
renovate[bot]
78f8a080a8 chore(deps): update sops-nix digest to e93ee1d 2025-05-05 22:50:09 +00:00
Luis Hebendanz
af2a00bde3 Merge pull request 'clan-cli: fix bubblewrap not finding bash when IN_NIX_SANDBOX=1 if prev environment doesn't have it in PATH' (#3503) from Qubasa/clan-core:fix_bubblewrap_bash_path into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3503
2025-05-05 21:07:22 +00:00
Luis Hebendanz
47c44ec7ec Merge pull request 'clan-cli: add test_create in clan_lib test folder' (#3501) from Qubasa/clan-core:api_vm_test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3501
2025-05-05 20:29:57 +00:00
Qubasa
1f66e90db1 clan-cli: fix bubblewrap not finding bash when IN_NIX_SANDBOX=1 if prev environment doesn't have it in PATH 2025-05-05 22:19:17 +02:00
hsjobeki
89fbf723ca Merge pull request 'API(cli): add method to Flake class to allow calling nix functions' (#3502) from hsjobeki/clan-core:improvements-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3502
2025-05-05 20:16:28 +00:00
Qubasa
548fdfb877 clan-cli: add test_create in clan_lib test folder 2025-05-05 22:16:02 +02:00
Johannes Kirschbauer
e44d34ef99 feat(clanLib): init evalServiceSchema 2025-05-05 21:55:29 +02:00
Johannes Kirschbauer
acc6797c22 API(cli): add method to Flake class to allow calling nix functions 2025-05-05 21:46:20 +02:00
Johannes Kirschbauer
9fbd943f44 API(clanInternals): add 'evalServiceSchema' endpoint 2025-05-05 21:46:20 +02:00
Johannes Kirschbauer
d42d9ad943 tests: add error prefix for json schema in checks 2025-05-05 21:46:16 +02:00
renovate[bot]
3c16ccdb38 chore(deps): update nixpkgs digest to ed30f8a 2025-05-05 16:10:18 +00:00
renovate[bot]
7b9e431da7 chore(deps): update data-mesher digest to d63db16 2025-05-05 15:50:11 +00:00
Mic92
05388c9c7e Merge pull request 'Log nsenter command on container tests' (#3498) from log-nsenter into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3498
2025-05-05 12:01:08 +00:00
pinpox
fe36aa4161 Log nsenter command on container tests 2025-05-05 13:00:11 +02:00
DavHau
6829c7f2dd vars: improve API of generate_vars_for_machine
receive list of generator names as an argument instead of generator objects
2025-05-05 15:55:04 +07:00
renovate[bot]
aa2e8eef88 chore(deps): update data-mesher digest to 0b5ff29 2025-05-05 08:10:11 +00:00
renovate[bot]
9e07064ec5 chore(deps): update nixpkgs digest to 6b1c028 2025-05-05 07:30:25 +00:00
renovate[bot]
305a361f56 chore(deps): lock file maintenance 2025-05-05 02:20:11 +00:00
renovate[bot]
db32e99082 chore(deps): update disko digest to 7b63642 2025-05-04 20:50:09 +00:00
Mic92
50ac0266f5 Merge pull request 'bind ssh controlmaster to live time of CLI' (#3491) from ssh-refactoring into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3491
2025-05-04 14:45:13 +00:00
Jörg Thalheim
b01691cb64 bind ssh controlmaster to live time of CLI 2025-05-04 16:28:14 +02:00
Mic92
44b237d9be Merge pull request 'test vars permissions in dummy-test' (#3490) from non-secret-var into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3490
2025-05-04 13:07:39 +00:00
Jörg Thalheim
f8bbd91c4a vars: warn if mode/owner/user is used on non-secret var 2025-05-04 14:59:22 +02:00
Jörg Thalheim
401de330f8 clanTest: remove unneeded parantheses 2025-05-04 14:59:22 +02:00
Jörg Thalheim
51da7ed5e8 vars: fix defaultText 2025-05-04 14:59:22 +02:00
Jörg Thalheim
e170cc2641 test vars permissions in dummy-test 2025-05-04 14:59:22 +02:00
Jörg Thalheim
8434f0fc35 fix ssh control master check (#3488)
Co-authored-by: pinpox <git@pablo.tools>
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3488
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Co-committed-by: Jörg Thalheim <joerg@thalheim.io>
2025-05-04 12:49:53 +00:00
Mic92
d6bbb42dda Merge pull request 'Revert "Merge pull request 'Fix deploying with sudo + password' (#3470) from target-host into main"' (#3489) from revert-sudo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3489
2025-05-04 11:40:28 +00:00
Jörg Thalheim
6539a6a24f Revert "Merge pull request 'Fix deploying with sudo + password' (#3470) from target-host into main"
This reverts commit 8a849eb90f, reversing
changes made to 3b5c22ebcf.
2025-05-04 13:37:39 +02:00
Mic92
8a849eb90f Merge pull request 'Fix deploying with sudo + password' (#3470) from target-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3470
2025-05-04 11:36:39 +00:00
Jörg Thalheim
15f691d5aa tests_secrets_cli: improve assertion message for pgp key 2025-05-04 10:51:49 +02:00
Jörg Thalheim
82949237b7 fix terminal output when terminal is put into interactive mode 2025-05-04 10:51:49 +02:00
Jörg Thalheim
7abb8bb662 update: fix sudo password prompt 2025-05-04 10:51:49 +02:00
Jörg Thalheim
f4d34b1326 fix upload when sudo prompts are needed 2025-05-04 10:51:49 +02:00
Mic92
3b5c22ebcf Merge pull request 'Miscellaneous ssh fixes.' (#3487) from misc-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3487
2025-05-04 08:51:31 +00:00
Mic92
a2ce48f8cc Merge pull request 'update_hardware_config: use host.run rather than adhoc ssh command' (#3486) from control-master into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3486
2025-05-04 08:47:34 +00:00
Jörg Thalheim
f6899166c7 cmd: don't shadow time module 2025-05-04 10:39:50 +02:00
Jörg Thalheim
f5277c989a Host: always set needs_user_terminal for ssh commands, only override prefix if given by user 2025-05-04 10:39:39 +02:00
Jörg Thalheim
03731a2a67 run_local: allow stdin to be a file descriptor 2025-05-04 10:39:28 +02:00
Jörg Thalheim
091a56f57d update_hardware_config: use host.run rather than adhoc ssh command 2025-05-04 10:30:46 +02:00
Jörg Thalheim
7351f7994c rename connect_ssh_shell to interactive_ssh
better name than secure shell shell
2025-05-04 10:28:43 +02:00
Jörg Thalheim
5770ea036c move password/tor_socks into Host attributes
we set those parameters usually just once.
2025-05-04 10:28:43 +02:00
Mic92
0d537a146e Merge pull request 'configure ControlMaster and ControlPath for SSH connections' (#3485) from control-master into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3485
2025-05-04 07:59:13 +00:00
Jörg Thalheim
c430ff6253 configure ControlMaster and ControlPath for SSH connections
This should speed up deployments by not having to reconnect to the server on each command
2025-05-04 09:48:37 +02:00
Mic92
f3f4ebfc71 Merge pull request 'facts/sops: no longer upload age key' (#3484) from facts-no-age-upload into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3484
2025-05-04 07:40:05 +00:00
Jörg Thalheim
b79446f97e facts/sops: no longer upload age key
The vars backend already does this for us.
This avoids duplicated work.
2025-05-04 09:29:29 +02:00
Mic92
6d75a5596e Merge pull request 'chore(deps): update nixpkgs digest to f21e454' (#3445) from renovate/nixpkgs-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3445
2025-05-04 07:16:50 +00:00
Mic92
2d97119a3b Merge pull request 'Avoid a few cases of chmod-after-creation' (#3438) from tangential/clan-core:it-s_a_race into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3438
2025-05-04 07:08:43 +00:00
Jörg Thalheim
d0ff114f6b disable age-plugin-se for now on aarch64-linuxql
disable
2025-05-04 09:07:06 +02:00
Mic92
20ab5a67c1 Merge pull request 'clanCore/vars/sops: only copy required secrets to store' (#3457) from vdbe/clan-core:clanCore/vars/sops/only-copy-used into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3457
2025-05-04 06:41:37 +00:00
vdbe
d445a353d5 clanCore/vars/sops: add sops & switch to builtins.path 2025-05-04 08:08:58 +02:00
vdbe
b08a2bdb75 clanCore/vars/sops: only copy required secrets to store
Create a store path per in repo secret/var to be copied, this prevents
unused secrets from being leaked.

For example the `root-password` generator contains both the hashed and
unhashed password but only the hash is used.
2025-05-04 08:08:58 +02:00
renovate[bot]
10fd3f6e43 chore(deps): update nixpkgs digest to f21e454 2025-05-04 06:00:13 +00:00
Mic92
e8c85e3237 Merge pull request 'Set terminal on nix flake update/archive' (#3468) from fix-shell-on-copy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3468
2025-05-04 05:59:58 +00:00
Mic92
6aa3ec66d8 Merge pull request 'don't depend on git for flake inputs' (#3483) from no-git into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3483
2025-05-04 05:48:10 +00:00
Mic92
b767a4a09c Merge pull request 'morph: speed up test by enabling useNixStoreImage' (#3481) from morph into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3481
2025-05-04 05:40:50 +00:00
Jörg Thalheim
b0bd209638 don't depend on git for flake inputs
This makes migration of an existing machine without git installed
easier:

fixes:
https://git.clan.lol/clan/clan-core/issues/3465#issuecomment-28189
2025-05-04 07:30:49 +02:00
Jörg Thalheim
b187d9b3d2 morph: speed up test by enabling useNixStoreImage 2025-05-04 07:29:31 +02:00
renovate[bot]
83d8c3d2f3 chore(deps): update data-mesher digest to 6544fb9 2025-05-03 21:00:09 +00:00
DavHau
1ce482f8f7 GUI/devshell: hot reload python API
This change speeds up the development workflow on the GUI when modifying the python api

The GUI started from the devshell already hot reloads itself on any change of the typescript codebase.

But python api changes were not caught bu the hot reload and required a reload of the devshell which is slow.

This change implements a custom vite plugin to also listen to changes coming from the clan-cli python code and re-generate the python-ts api on any change.
2025-05-03 19:22:16 +07:00
renovate[bot]
8803b3e0b5 chore(deps): update data-mesher digest to 642de25 2025-05-03 08:50:09 +00:00
renovate[bot]
9b66af37eb chore(deps): update data-mesher digest to 13026a9 2025-05-03 08:10:09 +00:00
DavHau
9186961ccb GUI/vars: add endpoints for getting prompts and generating vars 2025-05-03 14:44:51 +07:00
DavHau
ca594bbe95 refactor(vars): move migration logic to extra file 2025-05-03 07:33:11 +00:00
renovate[bot]
5454076df7 Update nix-darwin digest to 760a11c 2025-05-03 07:00:13 +00:00
DavHau
f8e7292bc4 GUI: generate sops key when creating clan 2025-05-03 13:00:27 +07:00
renovate[bot]
2ddb38a434 Update treefmt-nix digest to 29ec502 2025-05-02 20:40:11 +00:00
pinpox
a99c832ed9 Set terminal on nix flake update/archive
When using resident SSH-keys (-sk), e.g. from a Yubikey that require a
Pin, a terminal is needed to be able to enter it during deployment.
2025-05-02 15:41:29 +02:00
Mic92
12882ed68d Merge pull request 'Update data-mesher digest to 80b8ba4' (#3469) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3469
2025-05-02 13:31:17 +00:00
renovate[bot]
134c545782 Update data-mesher digest to 80b8ba4 2025-05-02 13:20:10 +00:00
renovate[bot]
7889192b7c Update data-mesher digest to ba46584 2025-05-02 03:40:09 +00:00
brianmcgee
05a18baecb Merge pull request 'clan-cli select: fix returning early on list select' (#3464) from select-lists-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3464
2025-05-01 16:06:31 +00:00
lassulus
e6ebca8588 clan-cli select: fix returning early on list select 2025-05-02 00:16:21 +09:00
renovate[bot]
fcf1c683c5 Update data-mesher digest to 9d10655 2025-05-01 13:30:09 +00:00
Mic92
db215a48b5 Merge pull request 'correct capitilization for targetHost in error message' (#3461) from target-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3461
2025-05-01 13:21:42 +00:00
Mic92
1df62bd2f2 Merge pull request 'clan_cli flake caching: fix caching of store files' (#3458) from select-store-caching into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3458
2025-05-01 13:12:05 +00:00
Jörg Thalheim
ea1c8b9503 correct capitilization for targetHost in error message 2025-05-01 15:11:05 +02:00
renovate[bot]
511b107511 chore(deps): update data-mesher digest to 2327a7e 2025-05-01 06:50:09 +00:00
lassulus
47bcec69ab clan_cli flake caching: fix caching of store files 2025-05-01 13:40:12 +09:00
renovate[bot]
47203d849e chore(deps): update data-mesher digest to c74c5ed 2025-04-30 16:10:09 +00:00
hsjobeki
7b4b700c33 Merge pull request 'Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api' (#3440) from hsjobeki/clan-core:ui-fixups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3440
2025-04-30 10:24:34 +00:00
kenji
69d394088b Merge pull request 'docs/reference: Improve wording of reference overview' (#3454) from kenji/clan-core:ke-docs-improve-reference into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3454
2025-04-30 10:19:12 +00:00
a-kenji
4c1e346cf2 docs/reference: Improve wording of reference overview
There is no value in calling it "automatically extracted" - but it is
potentially misleading.
2025-04-30 10:19:12 +00:00
hsjobeki
be9a43c50b Merge pull request 'fix(clan-app): Misc ui styling fixes' (#3451) from amunsen/clan-core:ui-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3451
2025-04-30 10:18:42 +00:00
Johannes Kirschbauer
049d41f35c Fix: fix sidebar marker for webkit 2025-04-30 12:05:51 +02:00
kenji
055bd1edd5 Merge pull request 'clanModules/password: Fix vars documentation' (#3453) from kenji/clan-core:ke-fix-vars-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3453
2025-04-30 10:05:22 +00:00
a-kenji
9ae44db29c clanModules/password: Fix vars documentation 2025-04-30 11:55:23 +02:00
Johannes Kirschbauer
17a6eda4b1 Fix: remove unused classNames 2025-04-30 11:43:29 +02:00
Timo
6beba157fe modules page: improves design cohesiveness of module components 2025-04-30 11:16:10 +02:00
Timo
a14dcf4adb form component: unify values and improve cohesiveness of overall design within dyn-form component 2025-04-30 11:14:19 +02:00
Timo
9bc23690a3 form components: adds general fieldset component and accordion component 2025-04-30 11:13:32 +02:00
Timo
5b0334adda button component: adds button-group component 2025-04-30 11:12:06 +02:00
Timo
45639c0d4f button component: moves dark style button into dedicated style classes 2025-04-30 11:09:03 +02:00
Timo
dfa861428f button component: orders classes and properties, moves tailwind classes to dedicates css file for better DOM readability 2025-04-30 11:09:03 +02:00
Timo
f15cd773c5 sidebarListItem: fixed active states to be displayed in ui 2025-04-30 11:09:03 +02:00
Timo
1a24a05034 general layout: removes drawer-component and adjusts font sizes in sidebar 2025-04-30 11:09:01 +02:00
Johannes Kirschbauer
e07551cecf Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api 2025-04-30 11:02:58 +02:00
DavHau
1f4b526e42 ci-performance: remove self reference from installation test 2025-04-30 15:53:18 +07:00
DavHau
8a4fe1405a gui: make update machine work
Also fix error when age plugins not defined
2025-04-30 15:28:49 +07:00
DavHau
f7e0345ab3 app: open welcome page if clan doesn't exist
Previously if a user started the app and the last opened clan directory does not exist anymore, it would still show the clan screen but without any machines.

This changes catches this case and throws the user back to the clan selection page
2025-04-30 14:48:05 +07:00
Mic92
11afc1faef Merge pull request 'chore(deps): update data-mesher digest to 517092d' (#3441) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3441
2025-04-30 06:48:06 +00:00
renovate[bot]
c0964e1b22 chore(deps): update data-mesher digest to 517092d 2025-04-30 06:40:11 +00:00
DavHau
f8c5b178a4 add select file that shouldn't exist but does to gitignore 2025-04-30 13:28:19 +07:00
DavHau
93090b74e5 ci performance: add check to ensure nothing depends on the whole repo
Since this project is an ever growing monorepo, having derivations depending on the whole repo leads to bad CI performance, as the cache is busted on every commit.

-> We never want any derivations depend on the whole repo

...except: the test that tests that nothing depends on the whole repo, which is added by this commit.

For now only add this check to packages to allow contributors to build it locally.
We might want to add it to the CI later once all occurrences are fixed.
2025-04-30 13:17:33 +07:00
hsjobeki
2ea4bd059c Merge pull request 'refactor(clan.service): make evalClanService a standalone function to interact with standalone modules' (#3444) from hsjobeki/clan-core:clan-services-4 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3444
2025-04-29 13:38:02 +00:00
Johannes Kirschbauer
3d09c98ed3 Checks: add json-compat check wrapper to ensure all clan.modules stay json-compatible 2025-04-29 15:31:02 +02:00
Johannes Kirschbauer
a4a1363195 refactor(clan.service): make evalClanService a standalone function to interact with standalone modules 2025-04-29 15:12:44 +02:00
renovate[bot]
fd4d42c54c chore(deps): update treefmt-nix digest to 82bf32e 2025-04-29 13:00:11 +00:00
hsjobeki
670cfe6fbc Merge pull request 'Feat(clan.service): require roles.interface to be json serializable' (#3442) from hsjobeki/clan-core:clan-services-4 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3442
2025-04-29 12:51:10 +00:00
Johannes Kirschbauer
9b5f100ac6 Feat(clan.service): require roles.interface to be json serializable 2025-04-29 14:42:47 +02:00
kenji
ff71c819e1 Merge pull request 'clanModules/iwd: Migrate from facts to vars' (#3439) from kenji/clan-core:ke-iwd-migrate-to-vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3439
2025-04-29 12:03:56 +00:00
a-kenji
4bd43f297a clanModules/iwd: Migrate from facts to vars 2025-04-29 13:55:45 +02:00
Michael Hoang
78f96ec533 Merge pull request 'age plugin support' (#3322) from feat/age-plugin-support into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3322
2025-04-29 06:12:44 +00:00
Brian McGee
a438fe77a7 feat: configure age plugins for SOPS in buildClan 2025-04-29 16:02:32 +10:00
Brian McGee
d3e1c0b4e4 fix: multiple user keys in secrets
We were not loading all the user keys, only the first one.
2025-04-29 15:47:54 +10:00
Brian McGee
1694a977f1 feat: support age plugins
Extends how we parse the contents of `SOPS_AGE_KEY` / `SOPS_AGE_KEY_FILE` / `keys.txt`, allowing a user to prepend a comment before any `AGE-PLUGIN-` secret key entry to indicate its corresponding public key.

For example:

```
AGE-PLUGIN-FIDO2-HMAC-xxxxxxxxxxxxx
```

The comment can use any prefix (e.g. `# public key: age1xxxx`, `# recipient: age1xxx`) as we are looking directly for `age1xxxx` within the line.

This change is necessary to support `age` plugins as there is no unified mechanism to recover the public key from a plugin's secret key.

If a plugin secret key does not have a preceding public key comment, an error will be thrown when attempting to set a secret.
2025-04-29 15:47:54 +10:00
Michael Hoang
852fdc2846 Merge pull request 'chore(deps): lock file maintenance' (#3365) from renovate/lock-file-maintenance into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3365
2025-04-29 05:22:24 +00:00
Michael Hoang
5879c48616 container-test-driver: fix SSH not working inside container tests 2025-04-29 15:10:09 +10:00
Michael Hoang
7d46237b67 container-test-driver: add Machine.fail 2025-04-29 14:57:58 +10:00
renovate[bot]
82b3ba97b7 chore(deps): lock file maintenance 2025-04-29 02:00:26 +00:00
renovate[bot]
a79c79ffec chore(deps): update data-mesher digest to 11b5673 2025-04-29 01:40:09 +00:00
Jonathan Thiessen
839f8fb347 Avoid a few cases of chmod-after-creation 2025-04-28 17:11:21 -07:00
DavHau
ebada396dd build-clan: Throw better error when _class is not provided by nixpkgs 2025-04-28 15:49:14 +00:00
renovate[bot]
b709f30ef4 chore(deps): update treefmt-nix digest to 763f1ce 2025-04-28 14:30:15 +00:00
hsjobeki
7c5ed8945f Merge pull request 'ui-fixups' (#3436) from hsjobeki/clan-core:ui-fixups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3436
2025-04-28 12:34:16 +00:00
Johannes Kirschbauer
a6f97b0a04 Fix(app/machine/create): fix css styling inconsistencies, remove ability to set tags 2025-04-28 14:25:29 +02:00
Johannes Kirschbauer
05c172466f Fix(app/sidebar): remove duplicate marker 2025-04-28 14:15:02 +02:00
Johannes Kirschbauer
b3e5b1de8a Chore(app): re-enable classname linting to be an error 2025-04-28 14:14:42 +02:00
hsjobeki
3b6657c657 Merge pull request 'Fix(app/machines): fix css styling of machine list overview' (#3435) from hsjobeki/clan-core:ui-fixups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3435
2025-04-28 12:08:07 +00:00
Johannes Kirschbauer
6700d3d502 Fix(app/machines): fix css styling of machine list overview 2025-04-28 14:00:17 +02:00
renovate[bot]
346853c4f7 chore(deps): update treefmt-nix digest to d1863f3 2025-04-28 11:10:15 +00:00
DavHau
19e528ef54 Merge pull request 'Revert "chore(deps): update data-mesher digest to 41534a3"' (#3432) from DavHau/clan-core:revert-data-mesher into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3432
2025-04-28 11:07:34 +00:00
DavHau
ab6a73cf6b Revert "chore(deps): update data-mesher digest to 41534a3"
This reverts commit f830bf4a0e.
2025-04-28 17:55:04 +07:00
renovate[bot]
f830bf4a0e chore(deps): update data-mesher digest to 41534a3 2025-04-28 08:00:20 +00:00
renovate[bot]
d69b814fa5 chore(deps): update treefmt-nix digest to c6d3010 2025-04-28 07:40:10 +00:00
renovate[bot]
9e6fdb4aff chore(deps): update nix-darwin digest to 4515dac 2025-04-28 05:30:10 +00:00
renovate[bot]
3c5ba156b8 chore(deps): update disko digest to d0c543d 2025-04-28 04:40:10 +00:00
Michael Hoang
da7abe26a8 Merge pull request 'cli: don't depend on the entire clan-core' (#3424) from push-pzytrksvysmu into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3424
2025-04-28 03:30:01 +00:00
Michael Hoang
c73652a401 cli: don't depend on the entire clan-core 2025-04-28 13:20:07 +10:00
Michael Hoang
c347badd7f cli: fallback to bundled Nixpkgs 2025-04-28 13:10:00 +10:00
Michael Hoang
c7c3abdf04 Merge pull request 'cli: don't use select from clanLib' (#3423) from push-ywotxpmyxlwp into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3423
2025-04-28 03:01:48 +00:00
Michael Hoang
6c8ef6e9be cli: don't use select from clanLib 2025-04-28 12:52:00 +10:00
renovate[bot]
52a28488c7 chore(deps): update data-mesher digest to 8d0a67b 2025-04-28 00:30:10 +00:00
renovate[bot]
15832521e7 chore(deps): update treefmt-nix digest to b2b6c02 2025-04-27 20:30:24 +00:00
renovate[bot]
9e409cbefe chore(deps): update data-mesher digest to f05729d 2025-04-27 20:10:09 +00:00
hsjobeki
5fc1f2cdbb Merge pull request 'Chore: remove unused legacy endpoints' (#3418) from hsjobeki/clan-core:chores-remove-unused into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3418
2025-04-27 11:25:00 +00:00
Johannes Kirschbauer
b87d5a238c chore: remove unused moduleSchemas and related API endpoint for legacy modules
We didn't reach the state where we would display these schemas in the
UI.
We might need to wire this up in a similar way for the newer
clan.services
2025-04-27 13:14:09 +02:00
Johannes Kirschbauer
7007b7d62e refactor: rename clanLib.values to introspection 2025-04-27 13:10:42 +02:00
hsjobeki
033c50a5c3 Merge pull request 'Feat(clan.service): init automatic assertions for api schema checks' (#3416) from hsjobeki/clan-core:new-json-schemas into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3416
2025-04-27 11:07:12 +00:00
hsjobeki
5aa8715e9f Merge pull request 'fix: typo in auto-upgrade clanModule' (#3417) from hsjobeki/clan-core:fix-auto-upgrade into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3417
2025-04-27 10:13:22 +00:00
Johannes Kirschbauer
3e31a73ae3 fix: typo in auto-upgrade clanModule 2025-04-27 12:04:03 +02:00
Johannes Kirschbauer
6dfc324661 Feat(clan.service): init automatic assertions for api schema checks 2025-04-27 11:49:56 +02:00
hsjobeki
95e6c5ca0f Merge pull request 'Feat(clan.service): enable opt-in json-schema restriction for clan.service interface modules' (#3415) from hsjobeki/clan-core:new-json-schemas into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3415
2025-04-27 09:49:08 +00:00
Johannes Kirschbauer
8495106ec4 feat(services): init feature flags in the module manifest: 'manifest.features.API' 2025-04-27 11:07:45 +02:00
Johannes Kirschbauer
ffa8257763 chore: remove unused option 'clanSchema' from core nixos modules 2025-04-27 11:07:45 +02:00
hsjobeki
bdeba9e4bf Merge pull request 'Init 'clan_lib' namespace and migrate clan_cli.api' (#3414) from hsjobeki/clan-core:clan-lib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3414
2025-04-26 18:29:35 +00:00
Johannes Kirschbauer
070114ae9f Fix(clan_lib.api): fix cyclic import problem for api schema export 2025-04-26 20:19:23 +02:00
Johannes Kirschbauer
acbe619883 Refactor(clan_lib): move clan_cli.api into clan_lib.api 2025-04-26 19:51:35 +02:00
Johannes Kirschbauer
3b889649ec Refactor(clan_cli): init clan_lib folder 2025-04-26 19:50:11 +02:00
Mic92
e335556767 Merge pull request 'nixpkgs source: delete existing symlink' (#3411) from nixpkgs-build into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3411
2025-04-25 14:41:23 +00:00
Jörg Thalheim
97564052ab nixpkgs source: delete existing symlink 2025-04-25 16:31:35 +02:00
Luis Hebendanz
7b6483bfad Merge pull request 'clan-cli: Expose private_key to Machine class, in the future we should merge Machine and Host class' (#3407) from Qubasa/clan-core:vpb-patches2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3407
2025-04-25 12:26:00 +00:00
Qubasa
130a5bc593 clan-cli: Improve remote destination depth validation with detailed error messaging 2025-04-25 14:00:40 +02:00
Qubasa
9d45376f95 clan-cli: Expose private_key to Machine class, in the future we should merge Machine and Host class 2025-04-25 13:38:03 +02:00
Mic92
e78bd89426 Merge pull request 'clanCore/vars: allow mode to be set' (#3404) from visualphoenix/clan-core:mode_fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3404
2025-04-25 09:44:25 +00:00
Raymond Barbiero
222915a9ed clanCore/vars: allow mode to be set
fmt
2025-04-25 11:29:43 +02:00
Michael Hoang
d8780b8da9 Merge pull request 'lib: move select.select -> select for backwards compat with old CLIs' (#3410) from push-vxxntzmwuzzx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3410
Reviewed-by: lassulus <clanlol@lassul.us>
2025-04-25 09:24:17 +00:00
Michael Hoang
cc4b009f06 lib: move select.select -> select for backwards compat with old CLIs 2025-04-25 17:30:06 +10:00
Michael Hoang
59e7af7830 Merge pull request 'Refactor select with new maybe selector' (#3362) from better-select into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3362
2025-04-25 07:02:22 +00:00
Michael Hoang
60ff14d6b7 cli: fix restoring backups
There was a bug in `select` that made it output attrsets instead of
lists so we fix the broken refactor done in
5ac629f549.
2025-04-25 16:52:13 +10:00
lassulus
34ac45bd13 clan-cli flake-module: get select from new lib location 2025-04-25 16:26:45 +10:00
lassulus
89adacebec templates: fix usage with new select 2025-04-25 16:26:45 +10:00
lassulus
5feccf4e57 Refactor select with new maybe selector
This is a great refactor of the select functionality in the flake class.
This now uses the same parser as the nix code, but runs it in python for
nice stacktraces.

Also we now have a maybe selector which can be used by prepending the
selector with a ?

Tests have been expanded to make sure the code is more stable and easier
to understand
2025-04-25 16:26:45 +10:00
Michael Hoang
27077817ae Merge pull request 'clan-app: improve README' (#3409) from push-ystlwosvuxvw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3409
2025-04-25 01:20:40 +00:00
Michael Hoang
d7f0c0fc78 clan-app: improve README 2025-04-25 11:12:27 +10:00
renovate[bot]
8f37df456d Update disko digest to ca27b88 2025-04-24 13:50:10 +00:00
DavHau
dc5d10931b Merge pull request 'clan-app: add basic smoke test using OCR + nixos tests' (#3406) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3406
2025-04-24 12:02:06 +00:00
DavHau
39c13a5c38 clan-app: add basic smoke test using OCR + nixos tests 2025-04-24 18:17:09 +07:00
renovate[bot]
4be8f7d973 Update data-mesher digest to 4fdda23 2025-04-24 07:30:09 +00:00
hsjobeki
785f68b2f6 Merge pull request 'Chore(clan/clan_uri): Remove ClanURI class from clan_cli' (#3401) from hsjobeki/clan-core:remove-clan-uri into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3401
2025-04-23 15:13:32 +00:00
Johannes Kirschbauer
7076f1b0e6 Chore(clan/clan_uri): Remove ClanURI class from clan_cli 2025-04-23 16:53:11 +02:00
hsjobeki
771901f6aa Merge pull request 'Refactor: move checks/lib into lib/ to avoid duplicate lib' (#3399) from hsjobeki/clan-core:checks-lib-remove into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3399
2025-04-23 14:33:19 +00:00
Johannes Kirschbauer
a589736f9b lib/tests: fix container driver module path 2025-04-23 16:23:09 +02:00
Johannes Kirschbauer
f6e514ec6f Refactor: move checks/lib into lib/ to avoid duplicate lib
Lets avoid the mistake of nixpkgs having multiple
libs
2025-04-23 16:19:16 +02:00
DavHau
366be7c723 Merge pull request 'inventory tests: use containers by default' (#3398) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3398
2025-04-23 12:59:52 +00:00
DavHau
e2fb237c33 inventory tests: use containers by default 2025-04-23 19:49:02 +07:00
hsjobeki
c172996dbf Merge pull request 'UI: fix general layout' (#3397) from hsjobeki/clan-core:ui-3 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3397
2025-04-23 11:33:35 +00:00
Mic92
8bc58b1f8c Merge pull request 'clanModules/vaultwarden: Migrate from facts to vars' (#3394) from kenji/clan-core:ke-vaultwarden-migrate-to-vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3394
2025-04-23 11:32:52 +00:00
a-kenji
47073aed43 clanModules/vaultwarden: Migrate from facts to vars
Closes: #3389
2025-04-23 13:01:52 +02:00
kenji
55e1141eb3 Merge pull request 'clanModules/syncthing: Improve vars' (#3391) from kenji/clan-core:syncthing-improve-vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3391
2025-04-23 10:50:45 +00:00
a-kenji
62e0ca7a08 clanModules/syncthing: Improve vars 2025-04-23 10:50:45 +00:00
a-kenji
55fbac76f8 clanModules/syncthing: Group vars files 2025-04-23 10:50:45 +00:00
Johannes Kirschbauer
0289c3ddea UI: fix general layout 2025-04-23 10:25:25 +00:00
renovate[bot]
cdf3f5df4b chore(deps): update disko digest to c5140c6 2025-04-23 09:40:09 +00:00
Mic92
d987049921 Merge pull request 'temporary disabling the VM test until we have vars fixed' (#3395) from vms into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3395
2025-04-23 09:38:26 +00:00
Jörg Thalheim
c7a3f35fb1 temporary disabling the VM test until we have vars fixed
We are currently missing injecting public vars back into the vm.
To unblock the CI, we disable the test for a bit.
2025-04-23 11:26:05 +02:00
kenji
9a4a60273d Merge pull request 'syncthing: Migrate from facts to vars' (#3388) from kenji/clan-core:syncthing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3388
2025-04-23 06:25:12 +00:00
a-kenji
5edc457fc1 chore: treefmt 2025-04-23 08:00:16 +02:00
a-kenji
8b2a92cda0 clanModules/syncthing: Fix vars usage
This fixes vars usage in the syncthing module.
Also removes some of the assumptions that were made in order for
`sysuser` to work, as we now use `userborn` for the vm functionality.
2025-04-23 07:40:44 +02:00
a-kenji
f8df19a128 checks/syncthing: Use default settings 2025-04-23 07:39:55 +02:00
a-kenji
fc5aaf5eaa checks/syncthing: Remove nixos tests 2025-04-23 07:38:36 +02:00
hsjobeki
6f2b7aa6d1 Merge pull request 'vars-fix-overeager-chache-invalidation' (#3385) from hsjobeki/clan-core:vars-fix-overeager-chache-invalidation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3385
2025-04-22 18:28:27 +00:00
Johannes Kirschbauer
d3927f50ae Tests/fix: forbid dynamic invalidation
We cannot support dynamic hashInvalidation.
This means the invalidation can change *after* or *before* a 'vars generate'
But not during the generation itself. This causes heavy performance overhead.
Additionally this introduces a fixed-point-iteration (compare: fixed-point-iteration vs. fixed-point-function)
This iteration takes ~ 1min for two bare-bones machine with 1 generator (see: checks/data-mesher)
2025-04-22 20:19:15 +02:00
Michael Hoang
50d032f6a4 Merge pull request 'cli/machines: don't allow installing on macOS' (#3387) from push-zrqstttptroo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3387
2025-04-22 17:22:21 +00:00
Michael Hoang
1168395336 cli/machines: don't allow installing on macOS 2025-04-23 03:13:39 +10:00
Mic92
38cbe58af4 Merge pull request 'zerotier: migrate from facts to vars' (#3383) from zerotier-vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3383
2025-04-22 16:48:32 +00:00
Jörg Thalheim
043077269a drop overrides of nix version 2025-04-22 18:20:35 +02:00
Jörg Thalheim
c2030eb3ba drop test_secrets_password_store
we are phasing out facts and the only fact we had left for testing, got
now dropped. We still have a sops facts test, which we might also drop
soon.
2025-04-22 18:20:35 +02:00
Jörg Thalheim
ffaa30d894 vms/run: upload vars 2025-04-22 18:20:35 +02:00
Jörg Thalheim
847e3ac4ab drop unused machine_get_fact 2025-04-22 18:20:35 +02:00
Jörg Thalheim
7392570859 use machine.{secrets,public}_{vars,fact}_store everywhere 2025-04-22 18:20:35 +02:00
Jörg Thalheim
fe6fd41a4d zerotier: migrate from facts to vars 2025-04-22 18:20:35 +02:00
Michael Hoang
b5cc250237 Merge pull request 'networking: set targetHost if FQDN is explicitly set' (#3386) from push-tylstpvrwsxv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3386
2025-04-22 15:40:45 +00:00
Michael Hoang
e6e7f5d5de networking: set targetHost if FQDN is explicitly set 2025-04-23 01:15:13 +10:00
hsjobeki
74e64d413f Merge pull request 'Fix: remove daisyui' (#3384) from hsjobeki/clan-core:ui-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3384
2025-04-22 14:58:53 +00:00
Johannes Kirschbauer
e417f79527 pkgs/generate-test-vars: speed up vars generation by precaching 2025-04-22 16:47:39 +02:00
Johannes Kirschbauer
b47f2b6870 vars: move overeager cache invalidation after one generator closure is regenrated.
Invalidation doesn't need to be done after each generator is executed.
We cannot interpolate values from other generators into another
generator. The generators are executed in order. The finalScript of each
generator stays constant.
After the complete closure is generated the caller of generate may
decide to invalidate the flake cache
2025-04-22 16:42:21 +02:00
Michael Hoang
5cadb0cfbc Merge pull request 'nixosModules/clanCore: support nix-darwin' (#3287) from nix-darwin into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3287
2025-04-22 13:50:38 +00:00
hsjobeki
ce55397ef7 Merge pull request 'Checks: add nixosIntegration test example to hello-service' (#3373) from hsjobeki/clan-core:checks-hello into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3373
2025-04-22 13:45:46 +00:00
Michael Hoang
20ae80ee49 vars: fix default group on macOS 2025-04-22 23:39:47 +10:00
Michael Hoang
f40ab5c379 docs: always evaluate with class of nixos 2025-04-22 23:39:47 +10:00
Michael Hoang
de12036630 cli: support updating nix-darwin machines 2025-04-22 23:39:47 +10:00
Michael Hoang
91a2739ea3 cli: fix unnecessary sudo when unspecified user defaults to root 2025-04-22 23:39:46 +10:00
Johannes Kirschbauer
7dd249863f Fix: remove daisyui
We wanted to remove daisyui a long time ago
Since renovate updates broke all of the classes somehow we use the opportunity to remove daisyui
And will fix all the breakages continously as we work on the features
2025-04-22 15:24:52 +02:00
Michael Hoang
b5901d5577 cli: only use sudo when deploying locally 2025-04-22 23:14:03 +10:00
Michael Hoang
a0117c51c1 cli: use sudo consistently when running nixos-rebuild switch 2025-04-22 23:14:03 +10:00
Michael Hoang
a575894a83 nixosModules/clanCore: support nix-darwin 2025-04-22 23:14:03 +10:00
Michael Hoang
2bbf4b168a Back out "cli: don't update macOS machines"
This backs out commit 72ed0e258a.
2025-04-22 23:14:03 +10:00
Johannes Kirschbauer
a6d7c491e4 Fix: clnixos-integration tests only work on linux 2025-04-22 14:56:09 +02:00
Mic92
1f78de953a Merge pull request 'Container-tests: add multi-container network' (#3381) from netns into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3381
2025-04-22 12:11:27 +00:00
DavHau
18493f869b container-tests: add multi-container network 2025-04-22 13:26:37 +02:00
Michael Hoang
b6ac3dbc88 Merge pull request 'Chore: restore ui lockfile from a3f6fb21c8a22977009e1055fc1d31507977e7f2' (#3380) from hsjobeki/clan-core:ui-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3380
2025-04-22 10:41:20 +00:00
Johannes Kirschbauer
4ead0045cb Fix: typescript problem with inventory indexing 2025-04-22 12:10:25 +02:00
renovate[bot]
3a5efdbd9f chore(deps): update sops-nix digest to 5e3e92b 2025-04-22 08:50:11 +00:00
Johannes Kirschbauer
6630e227c7 Chore: restore ui lockfile from a3f6fb21c8 2025-04-22 09:48:46 +02:00
Jörg Thalheim
508e71cace syncthing: warn that this module is currently not usuable without vms 2025-04-22 09:45:37 +02:00
Jörg Thalheim
21f69ca7c4 syncthing: migrate to new inventory system 2025-04-22 09:45:37 +02:00
Johannes Kirschbauer
999c47dbed Checks: add nixosIntegration test example to hello-service 2025-04-22 06:32:32 +00:00
hsjobeki
bcc4aa9902 Merge pull request 'Chore: disable renovate for the ui' (#3375) from hsjobeki/clan-core:renovate-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3375
2025-04-21 18:52:16 +00:00
renovate[bot]
15b10bd9ad chore(deps): update typescript-eslint monorepo to v8.31.0 2025-04-21 18:00:18 +00:00
renovate[bot]
73e5d08511 chore(deps): update dependency eslint to v9.25.1 2025-04-21 17:20:16 +00:00
renovate[bot]
580a087ef4 chore(deps): update dependency @eslint/js to v9.25.1 2025-04-21 17:00:16 +00:00
Johannes Kirschbauer
65b16af7ef Chore: disable renovate for the ui
We disable renovate until we have automated ui tests
Renovate broke our UI because we dont have test that would fail
2025-04-21 18:54:24 +02:00
Michael Hoang
8f490c3362 Merge pull request 'vars: improve messaging' (#3372) from push-tktvqwxutpnx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3372
2025-04-21 16:11:41 +00:00
Michael Hoang
8ae348d686 vars: improve messaging 2025-04-22 02:03:24 +10:00
Mic92
2fbdb70ca3 Merge pull request 'state-version: fix default of config.system.stateVersion' (#3371) from test-vars-generate into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3371
2025-04-21 15:45:21 +00:00
Jörg Thalheim
69224e57fa state-version: fix default of config.system.stateVersion
fixes https://git.clan.lol/clan/clan-core/issues/3360
2025-04-21 15:37:22 +00:00
hsjobeki
5908aed2c7 Merge pull request 'Inventory/tags: init {nixos,darwin} tags' (#3370) from hsjobeki/clan-core:tags-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3370
2025-04-21 15:27:13 +00:00
Johannes Kirschbauer
cd0e8eafce Fix: manually define empty tags for testing 2025-04-21 17:17:56 +02:00
Johannes Kirschbauer
9d413a7682 Inventory/tags: init {nixos,darwin} tags 2025-04-21 16:43:15 +02:00
hsjobeki
b107d2bc49 Merge pull request 'refactor(clanServices): add example of eval test' (#3337) from hsjobeki/clan-core:clan-services-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3337
2025-04-21 14:19:26 +00:00
Johannes Kirschbauer
ec99aea8f7 refactor: init hello-world module with unit tests (eval) 2025-04-21 16:10:05 +02:00
Johannes Kirschbauer
b791656694 clanLib: init flakeModules for better testing 2025-04-21 16:10:05 +02:00
Johannes Kirschbauer
f7b12d8bda refactor(clanServices): add example of eval test 2025-04-21 16:10:05 +02:00
Mic92
ee07f79ba9 Merge pull request 'test-vars-generate: override machines class yet' (#3369) from test-vars-generate into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3369
2025-04-21 13:28:11 +00:00
Jörg Thalheim
9780f45e97 generate-test-vars: use shutil.rmtree instead of rm
More portable.
2025-04-21 15:18:14 +02:00
Jörg Thalheim
74ef833dd3 generate-test-vars: improve caching and reduce number of overrides in base class 2025-04-21 15:18:14 +02:00
Jörg Thalheim
b4880d09a9 Machines: remove unused method argument from self.nix() 2025-04-21 15:18:14 +02:00
Jörg Thalheim
a4dfdc300e generate-test-vars: use absolute paths in flake urls
flakes don't work with releative paths
2025-04-21 15:18:14 +02:00
Jörg Thalheim
60dcfd5cf9 rename vars-generate to generate-test-vars 2025-04-21 15:18:14 +02:00
Jörg Thalheim
df08fea1c1 devshell/clan-cli: fix CLAN_PROVIDED_PACKAGES having too many packages 2025-04-21 15:18:14 +02:00
Jörg Thalheim
80e739bd1b Reapply "remove nix_shell_legacy"
This reverts commit 1232fb5af2.
2025-04-21 13:23:50 +02:00
hsjobeki
5eef4ba663 Merge pull request 'pkgs(vars-generator): init new package to generate vars' (#3357) from hsjobeki/clan-core:patch-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3357
2025-04-21 11:13:49 +00:00
renovate[bot]
de09f5cc8f chore(deps): update dependency vitest to v3.1.2 2025-04-21 09:00:33 +00:00
renovate[bot]
c7809018bd chore(deps): update disko digest to 1770bf1 2025-04-21 08:50:11 +00:00
renovate[bot]
08dfd7e1b4 chore(deps): update data-mesher digest to 817a74e 2025-04-21 00:20:13 +00:00
hsjobeki
1eca2261e1 Merge pull request 'chore(select/cache): rename 'prefetch' to 'invalidate_cache'' (#3364) from hsjobeki/clan-core:vars-fixing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3364
2025-04-20 15:00:35 +00:00
Johannes Kirschbauer
a01437d01e pkgs(vars-generator): init new package to generate vars 2025-04-20 14:08:52 +02:00
Johannes Kirschbauer
872d54b594 chore(select/cache): rename 'prefetch' to 'invalidate_cache' 2025-04-20 13:34:52 +02:00
hsjobeki
310b6c8345 Merge pull request 'machine/vars: expose result direclty via vars submodule; keep deployment.data alias for now' (#3363) from hsjobeki/clan-core:vars-fixing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3363
2025-04-20 11:32:03 +00:00
Johannes Kirschbauer
dbd859bea2 machine/vars: expose result direclty via vars submodule; keep deployment.data alias for now 2025-04-20 13:23:01 +02:00
renovate[bot]
779d28577d chore(deps): update dependency eslint to v9.25.0 2025-04-18 18:40:14 +00:00
renovate[bot]
07ea8237f5 chore(deps): update dependency @eslint/js to v9.25.0 2025-04-18 18:20:14 +00:00
Michael Hoang
c2d53e4525 Merge pull request 'vars: make wording nicer when multiple vars are found' (#3351) from push-zrtnwqoxyzmz into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3351
2025-04-18 17:28:01 +00:00
Michael Hoang
23ae0e6712 vars: make wording nicer when multiple vars are found 2025-04-18 19:18:42 +02:00
hsjobeki
58aaf879e0 Merge pull request 'Revert "remove nix_shell_legacy"' (#3356) from hsjobeki/clan-core:patch-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3356
2025-04-18 12:58:57 +00:00
Johannes Kirschbauer
1232fb5af2 Revert "remove nix_shell_legacy"
This reverts commit 8cde32c76f.
2025-04-18 14:49:54 +02:00
pinpox
83542b20b4 Merge pull request 'Fix conftest typo' (#3355) from fix-conftest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3355
2025-04-18 12:35:31 +00:00
pinpox
2152d59d9d Fix conftest typo 2025-04-18 14:25:22 +02:00
hsjobeki
0b983d7994 Merge pull request 'test(cli/select): add simple caching test' (#3342) from hsjobeki/clan-core:select-testing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3342
2025-04-18 12:15:05 +00:00
Johannes Kirschbauer
ebb1be084f test(cli/select): add simple caching test 2025-04-18 14:06:59 +02:00
renovate[bot]
98adaebde3 chore(deps): update treefmt-nix digest to 8d404a6 2025-04-18 08:10:19 +00:00
renovate[bot]
3ca04e4c3b chore(deps): update data-mesher digest to 0328b8c 2025-04-18 08:00:13 +00:00
renovate[bot]
5b627f9b48 chore(deps): update data-mesher digest to b824c4f 2025-04-18 06:10:22 +00:00
renovate[bot]
a7256f7fb3 chore(deps): update treefmt-nix digest to 2550683 2025-04-18 06:00:14 +00:00
renovate[bot]
00921311a9 chore(deps): update dependency vite to v6.3.2 2025-04-18 05:00:15 +00:00
renovate[bot]
5aeee3716b chore(deps): update disko digest to 51d33bb 2025-04-18 02:10:10 +00:00
Michael Hoang
2424ae21b7 Merge pull request 'build-clan: fix constructing nix-darwin machines' (#3345) from push-rnzmyrvqrqmv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3345
2025-04-17 18:32:22 +00:00
Michael Hoang
41ff4a4247 build-clan: fix constructing nix-darwin machines 2025-04-17 20:23:54 +02:00
renovate[bot]
3f8b7feb1d fix(deps): update dependency @tanstack/solid-query to v5.74.4 2025-04-17 10:00:16 +00:00
renovate[bot]
3ec8dbdcdf chore(deps): update dependency vite to v6.3.1 2025-04-17 02:00:17 +00:00
Mic92
e90b6c7f82 Merge pull request 'Remove nix_shell_legacy' (#3341) from nix_shell into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3341
2025-04-16 19:56:53 +00:00
Jörg Thalheim
8cde32c76f remove nix_shell_legacy 2025-04-16 21:03:58 +02:00
Mic92
37f8b5919e Merge pull request 'nix_shell' (#3339) from nix_shell into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3339
2025-04-16 18:38:09 +00:00
Jörg Thalheim
10cd98e158 rename CLAN_STATIC_PROGRAMS -> CLAN_PROVIDED_PACKAGES 2025-04-16 18:27:01 +00:00
Jörg Thalheim
2240a3a533 rename nix_shell_legacy to nix_shell and run_cmd to nix_shell
Than it's more obvious that we need to migrate.
2025-04-16 18:27:01 +00:00
Mic92
4b9a0d8c19 Merge pull request 'lib/jsonschema: make attrs required' (#3335) from fricklerhandwerk/clan-core:required-attrs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3335
2025-04-16 18:26:46 +00:00
Mic92
25b1b9301b Merge pull request 'sunshine/moonlight/mumble: migrate to vars' (#3338) from sunshine into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3338
2025-04-16 17:59:09 +00:00
Jörg Thalheim
56a0b0a994 run_cmd: print what commands are allowed in if the current command is not in the allow list 2025-04-16 19:50:27 +02:00
Jörg Thalheim
ed68a4dde1 update_hardware_config: migrate from nix_shell to run_cmd 2025-04-16 19:32:40 +02:00
Jörg Thalheim
80a252cf1a sort allowed-programs.json 2025-04-16 19:32:40 +02:00
Jörg Thalheim
00d25d7fb8 Host: migrate from nix_shell to run_cmd 2025-04-16 19:32:40 +02:00
Jörg Thalheim
f94625fa6e mumble: fix certificate generator
no idea how this ever worked before.
2025-04-16 18:49:24 +02:00
Jörg Thalheim
bcd2b1ae1f mumble: migrate to inventory 2025-04-16 18:49:24 +02:00
Jörg Thalheim
51b184e8be mumble: remove duplicate nixos test 2025-04-16 18:49:24 +02:00
Jörg Thalheim
45ae0920e2 mumble: migrate to vars 2025-04-16 18:49:24 +02:00
Jörg Thalheim
1f50ee51df update-vars: don't print private key 2025-04-16 18:49:24 +02:00
Jörg Thalheim
6057d3e044 update-vars: fallback to gitroot 2025-04-16 18:49:24 +02:00
Jörg Thalheim
188764bca5 moonlight/sunshine: mark as unusuable outside of our VM
we depend on VM user, which only will work with our vm nixos module
2025-04-16 17:48:09 +02:00
Jörg Thalheim
cdfd03a067 migrate moonlight/sunshine to vars 2025-04-16 17:48:09 +02:00
Valentin Gagarin
ebd5afe8f5 fixup(jsonschema): test attrsOf submodules with valid value 2025-04-16 16:55:50 +02:00
Valentin Gagarin
6a2e81373c lib/jsonschema: render defaults for submodule options
this relaxes the constraint that options of type `submodule` are always
required, and will render benign default values.
2025-04-16 16:55:46 +02:00
Mic92
ee16f7c072 Merge pull request 'Move clan history subcommand to clan-vm-manager' (#3336) from fix-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3336
2025-04-16 13:14:34 +00:00
Jörg Thalheim
6703473152 impure-checks: limit number of workers to number of tests 2025-04-16 15:05:59 +02:00
Jörg Thalheim
d2173cb120 migrate clan history to clan-vm-manager
this functionality is not really useful or used in clan-vm-manager and
therefore should live in the clan-vm-manager.

Not porting the test for now because we probably get rid of the clan-vm-manager soon in favour of the UI.
2025-04-16 14:51:37 +02:00
Jörg Thalheim
42025fbfff Remove unused clan history update subcommand 2025-04-16 14:51:37 +02:00
Johannes Kirschbauer
9f7e9ca9df feat(jsonschema): add test for attrsof submodule 2025-04-16 14:48:49 +02:00
Valentin Gagarin
e28681c4f2 lib/jsonschema: make attrs required
Before the change, modules of the form

```nix
{ lib, ... }: {
  foo.bar = lib.mkOption {
    # ...
  };
}
```

or

```nix
{ lib, ... }: {
  foo = lib.mkOption {
    type = lib.types.subModule {
      bar = lib.mkOption {
        # ...
      };
    };
  };
}
```

would not render with `foo` as required, which is not faithful to the
module system's semantics.

This change also tests that fields with defaults are not marked required.
Note that submodule options cannot have their defaults rendered to JSON
schema, and are therefore always marked required.

Architecturally this change is rather unfortunate: So far the checks for
defaults happen in the rendering (using `isDefault`) and not in the parsing,
but here we're adding a field to `$exportedModuleInfo`. While strictly
speaking we probably don't want to consider requiredness as module-level
information, it seems more reasonable to me to do it that way since at
the JSON schema level we have lost the distinction between `attrs`,
`attrsOf`, `submodule`.
2025-04-16 13:20:00 +02:00
renovate[bot]
46ddc9f438 chore(deps): update dependency vite to v6.3.0 2025-04-16 09:50:12 +00:00
hsjobeki
65bb3863e0 Merge pull request 'init(clanServices): create a new folder for migrated modules (clanServices); add a module as example' (#3334) from hsjobeki/clan-core:clanServices-init into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3334
2025-04-16 09:44:57 +00:00
Johannes Kirschbauer
69ce584b96 init(clanServices): add zerotier boilerplate to clanServices 2025-04-16 11:34:58 +02:00
hsjobeki
49977bd935 Merge pull request 'feat(scripts/update-vars): expose all configurables as arguments {repo_root, test_dir, check_attr}' (#3333) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3333
2025-04-16 08:50:44 +00:00
Johannes Kirschbauer
2796038254 chore(test/makeTestClan): document all options, remove magic specialArgs 2025-04-16 10:33:32 +02:00
Johannes Kirschbauer
7bdb2cabf9 fix: rename folder lib/tests -> lib/test to be consistent with the attribute name 2025-04-16 10:04:31 +02:00
Johannes Kirschbauer
7dec3b8117 fixup: update commen in inventory example test 2025-04-16 10:02:20 +02:00
Johannes Kirschbauer
23270ff0ce feat(scripts/update-vars): expose all configurables as arguments {repo_root, test_dir, check_attr} 2025-04-16 09:50:09 +02:00
hsjobeki
f1856fbaa3 Merge pull request 'revert vars: use writeShellApplication to shellcheck generators' (#3331) from hsjobeki-patch-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3331
2025-04-16 07:44:53 +00:00
hsjobeki
c895907b9d revert 83ec5a063a
revert vars: use writeShellApplication to shellcheck generators

Cannot re-generate the vars for data-mesher or any of our tests anymore

cc @DavHau @Qubasa Can we work together to fix this.
I like shellchecking but if we loose the ability to add tests thats unfortunate
This is blocking: the new 'restic' and 'zerotier' migrations because we need to write integration tests from the beginning.
2025-04-16 07:14:25 +00:00
hsjobeki
104bb9f90d Merge pull request 'tests(clan): move test-inventory.nix to clanLib. And name it 'makeTestClan'' (#3330) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3330
2025-04-15 16:27:09 +00:00
Johannes Kirschbauer
8ae0f5ddcb tests(clan): move test-inventory.nix to clanLib. And name it 'makeTestClan'
Exposing the function via clanLib makes it more accessible to clan modules
This allows each module to define its own test without needing to depend on any fileSystem path assumptions in the clan-core repo
2025-04-15 18:17:40 +02:00
hsjobeki
20d42b961a Merge pull request 'feat(buildClan): expose {nixosModules,darwinModules} from clanInternals' (#3329) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3329
2025-04-15 15:45:01 +00:00
Michael Hoang
ea174379ca Merge pull request 'clanCore: remove clan.core.module' (#3327) from push-vwpyxmnwqttw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3327
2025-04-15 15:27:24 +00:00
Johannes Kirschbauer
f331295dd5 feat(buildClan): expose {nixosModules,darwinModules} from clanInternals
These are the exact same modules that where used internally to construct the corresponding
'nixosConfiguration', 'darwinConfiguration'
They can be externally used, and would yield the same result
Given that you pass the same 'specialArgs'
2025-04-15 17:25:57 +02:00
Michael Hoang
3d5dbeb201 clanCore: remove clan.core.module 2025-04-15 17:17:16 +02:00
hsjobeki
443eb7dacb Merge pull request 'refactor: buildClan output; output deferred modules instead of nixosConfig' (#3323) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3323
2025-04-15 14:47:49 +00:00
Michael Hoang
11a4dcfd6f Merge pull request 'machines: fix nixos-rebuild not getting retried' (#3325) from push-vqmkpyrsvqqw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3325
2025-04-15 14:31:47 +00:00
Michael Hoang
99be2d0019 machines: fix nixos-rebuild not getting retried 2025-04-15 16:16:03 +02:00
Johannes Kirschbauer
9800255a2c refactor(buildClan): simplify pkgs overriding logic 2025-04-15 16:05:57 +02:00
Johannes Kirschbauer
e68ab67112 refactor(buildClan): move modules into 'forName' and import the correct core module depending on class 2025-04-15 15:29:01 +02:00
Johannes Kirschbauer
d264e262bd fixup(buildClan): use clan.inventory instead of refering to the clanInternals dumping ground within the module 2025-04-15 15:10:08 +02:00
Johannes Kirschbauer
af04bf547f fixup(buildClan): split up the inner-module into: {forSystem, forName}
I am preparing this such that we can move the forName modules into the
defaults for the deferred module outputs and the forSystem modules are
added later and only for the 'configsPerSystem' where we actually need
the system modules
2025-04-15 15:02:37 +02:00
renovate[bot]
c7631e4a21 chore(deps): update data-mesher digest to 439f851 2025-04-15 12:30:10 +00:00
Johannes Kirschbauer
14ace40820 refactor: buildClan output; output deferred modules instead of nixosConfig 2025-04-15 14:25:02 +02:00
Michael Hoang
eb2639eb41 Merge pull request 'build-clan: drop unused machinesFunc' (#3324) from push-wktowzqkrvsp into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3324
2025-04-15 12:20:09 +00:00
Michael Hoang
5cc1d823aa build-clan: drop unused machinesFunc 2025-04-15 13:30:28 +02:00
renovate[bot]
335455cc83 chore(deps): update treefmt-nix digest to 49d0555 2025-04-15 09:10:10 +00:00
lassulus
9bb21d5724 Merge pull request 'fast-vars-gen' (#3216) from fast-vars-gen into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3216
2025-04-15 07:11:06 +00:00
Mic92
fac18d0ee8 Merge pull request 'Rework cache to use json instead of pickle' (#3319) from validation-hash-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3319
2025-04-15 07:11:03 +00:00
Jörg Thalheim
812093b551 rework cache to use json instead of pickle
Pickle can silently break if migrate our data layout and also introduces
unwanted behaviour such as code injection that we want to avoid.
2025-04-15 07:00:00 +00:00
renovate[bot]
764a60b1db chore(deps): update data-mesher digest to 0593ae1 2025-04-15 05:00:13 +00:00
renovate[bot]
de337ad671 chore(deps): update sops-nix digest to 6115430 2025-04-14 23:10:10 +00:00
renovate[bot]
bf11a1a079 chore(deps): update typescript-eslint monorepo to v8.30.1 2025-04-14 20:20:16 +00:00
renovate[bot]
7b43226b01 chore(deps): update typescript-eslint monorepo to v8.30.0 2025-04-14 17:20:17 +00:00
Jörg Thalheim
1c3f408ce1 test_vars_deployment: skip on macOS for now
we can not run vms on macOS at the moment.
2025-04-14 15:47:55 +00:00
Michael Hoang
aec338a0f4 Merge pull request 'build-clan: expose Clan configuration as a module' (#3303) from push-lsoyznsukqyq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3303
2025-04-14 14:16:26 +00:00
Michael Hoang
95fd1ec7eb build-clan: expose Clan configuration as a module 2025-04-14 16:04:06 +02:00
Michael Hoang
a07e282738 Merge pull request 'checks: test-backups -> backups' (#3312) from push-nqvwsmllsyrx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3312
2025-04-14 13:47:59 +00:00
Michael Hoang
443eb490e8 checks: test-backups -> backups 2025-04-14 15:39:25 +02:00
renovate[bot]
07d218cd4c fix(deps): update dependency @tanstack/solid-query to v5.74.3 2025-04-14 13:00:13 +00:00
lassulus
f4870583dc clan_cli test_vars: start refactoring to use caching 2025-04-14 14:28:59 +02:00
lassulus
db9097d5d0 clan_cli machines update: cache values for faster eval 2025-04-14 14:28:59 +02:00
lassulus
21c45e5ad9 clan_cli vars generate: prefetch all validationHashes for faster eval 2025-04-14 14:28:59 +02:00
Mic92
ecce8c20a1 Merge pull request 'don't error on macOS if sandbox for vars is missing' (#3309) from macos-sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3309
2025-04-14 12:24:49 +00:00
Jörg Thalheim
ef5d62a1c1 don't error on macOS if sandbox for vars is missing 2025-04-14 14:11:51 +02:00
Mic92
9276b166f0 Merge pull request 'cache nix_config' (#3306) from nix-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3306
2025-04-14 11:23:33 +00:00
Jörg Thalheim
7dc070b36f cache nix_config
We often call this several times during execution.
At the moment we only use system at the moment, which is unlikely to
change.
2025-04-14 13:13:49 +02:00
renovate[bot]
3352348938 fix(deps): update dependency @tanstack/solid-query to v5.74.2 2025-04-14 11:00:13 +00:00
Luis Hebendanz
bec11ee23a Merge pull request 'clan-cli: Don't eval 'modules' while getting templates. 'modules' can be not JSON serializable' (#3280) from Qubasa/clan-core:fix_templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3280
2025-04-14 10:38:07 +00:00
Luis Hebendanz
51c2f0e74c Merge pull request 'chore(clan/cli): remove --reflink=auto' (#3291) from visualphoenix/clan-core:clan_cli_osx_cp_fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3291
2025-04-14 10:24:35 +00:00
renovate[bot]
bfdf40869d chore(deps): lock file maintenance 2025-04-14 00:20:38 +00:00
renovate[bot]
f152e67067 chore(deps): lock file maintenance 2025-04-14 00:00:39 +00:00
renovate[bot]
9025619f39 fix(deps): update dependency @tanstack/solid-query to v5.74.0 2025-04-13 18:00:14 +00:00
renovate[bot]
8255857209 chore(deps): update nixpkgs digest to 18dd725 2025-04-13 16:30:10 +00:00
Michael Hoang
9818ddc687 Merge pull request 'machines: minor refactor of update' (#3301) from push-swpwpzmlspko into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3301
2025-04-13 16:24:10 +00:00
Michael Hoang
54e3414cef machines: minor refactor of update 2025-04-13 18:14:17 +02:00
renovate[bot]
26fc297598 chore(deps): update data-mesher digest to 25b5342 2025-04-13 12:20:15 +00:00
renovate[bot]
d65a72ab48 chore(deps): update dependency jsdom to v26.1.0 2025-04-13 10:40:16 +00:00
renovate[bot]
5b37eeb4d1 chore(deps): update sops-nix digest to 7e147a1 2025-04-13 04:40:14 +00:00
renovate[bot]
4956bcdbfd chore(deps): update nixpkgs digest to f6db44a 2025-04-13 03:40:25 +00:00
renovate[bot]
7abb7dcd12 chore(deps): update data-mesher digest to 3d421cc 2025-04-13 03:20:14 +00:00
renovate[bot]
fc85ff9b28 chore(deps): update data-mesher digest to fd210d7 2025-04-13 02:50:09 +00:00
renovate[bot]
1ef6133fa3 chore(deps): update nixpkgs digest to 52d0ede 2025-04-13 02:10:24 +00:00
Raymond Barbiero
ba7bec1fe1 chore(clan/cli): remove --reflink=auto 2025-04-12 19:41:43 -04:00
renovate[bot]
2807fb6244 chore(deps): update nix-darwin digest to 43975d7 2025-04-12 17:40:13 +00:00
renovate[bot]
d69ae6049a chore(deps): update data-mesher digest to 35cc96c 2025-04-12 15:40:25 +00:00
renovate[bot]
d3615e9f60 chore(deps): update nixpkgs digest to 2349f9d 2025-04-12 15:20:27 +00:00
renovate[bot]
28effcb096 fix(deps): update tanstack-query monorepo to v5.73.3 2025-04-12 14:40:16 +00:00
renovate[bot]
be7e95cc25 chore(deps): update data-mesher digest to ea73779 2025-04-12 12:50:21 +00:00
renovate[bot]
ed52cc019f chore(deps): update nixpkgs digest to 642c54c 2025-04-12 12:30:26 +00:00
Michael Hoang
21d376a9b6 Merge pull request 'chore(deps): update nixpkgs digest to d19cf9d' (#3273) from renovate/nixpkgs-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3273
2025-04-12 11:19:32 +00:00
Michael Hoang
f086fe01da treewide: switch back to pkgs.nix 2025-04-12 13:15:53 +02:00
renovate[bot]
fa10067473 chore(deps): update nixpkgs digest to d19cf9d 2025-04-12 11:00:13 +00:00
hsjobeki
6e5856d5ff Merge pull request 'chore(checks/inventory): doogfood 'clan' flake-parts module into the test, instead of custom inventory logic' (#3279) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3279
2025-04-12 10:49:05 +00:00
Johannes Kirschbauer
5e03a44937 fixup(checks/inventory): remove 'self' from clan settings; doesn't work in the nixos tests yet.
We need to reasearch why that is the case.
Removing the option for now to prevent weird bugs
2025-04-12 12:41:11 +02:00
renovate[bot]
bae744053a chore(deps): update dependency @types/node to v22.14.1 2025-04-11 21:40:15 +00:00
Qubasa
af776f1efa clan-cli: Fix failing tests. Add a big FIXME for clan.select 2025-04-11 23:36:02 +02:00
Luis Hebendanz
bfba638b1e Merge pull request 'clan-cli: Fix single file upload in upload.py, add test for edge case' (#3182) from Qubasa/clan-core:fix_single_file_upload into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3182
2025-04-11 17:14:35 +00:00
Qubasa
9097d5e6e0 clan-cli: Fix single file upload in upload.py, add test for edge case 2025-04-11 19:08:13 +02:00
Johannes Kirschbauer
02f630a25b chore(checks): rename data-mesher test attributes 2025-04-11 13:53:04 +02:00
Johannes Kirschbauer
762cc5e7cb chore(checks/inventory): doogfood 'clan' flake-parts module into the test, instead of custom inventory logic 2025-04-11 13:52:23 +02:00
renovate[bot]
e1e4c02b39 chore(deps): update data-mesher digest to 60f9395 2025-04-11 11:40:13 +00:00
hsjobeki
f94e3a20a4 Merge pull request 'chore(clan/cli): remove explizit dependency on jsonschema converter.' (#3277) from hsjobeki/clan-core:chores into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3277
2025-04-10 21:10:43 +00:00
Johannes Kirschbauer
cf273d2209 chore(clan/cli): remove explizit dependency on jsonschema converter.
Regenerating the classes from json schema as part of the clan/cli is a bit redundant since we need to vendor the classes by hand anyways
The user can also not practically override the inventory options
I would disable this for now; until we really need it.
We now solely rely on CI checks failing if the classes are out of sync
2025-04-10 22:58:30 +02:00
hsjobeki
97c1dd7700 Merge pull request 'chore(clan/vars): make no-sandboxing message print a more explizit re-run command' (#3276) from hsjobeki/clan-core:chores into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3276
2025-04-10 20:55:14 +00:00
Johannes Kirschbauer
ffb1d51fc4 chore(clan/vars): make no-sandboxing message print a more explizit re-run command 2025-04-10 22:39:27 +02:00
Luis Hebendanz
5342428fc6 Merge pull request 'vars: use writeShellApplication to shellcheck generators' (#3270) from Qubasa/clan-core:rtunreal-shell_check_vargen into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3270
2025-04-10 19:07:42 +00:00
Qubasa
92d7b680c7 clan-cli: Fixup more failing tests because of quoting issues 2025-04-10 14:33:54 +02:00
renovate[bot]
3b90064a99 chore(deps): update data-mesher digest to 7af2bfe 2025-04-10 08:40:13 +00:00
Michael Hoang
cbc5cd69ad Merge pull request 'flake: update nix-darwin owner' (#3275) from push-osprlszlnnvr into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3275
2025-04-10 08:38:25 +00:00
Michael Hoang
168c9fb5f6 flake: update nix-darwin owner 2025-04-10 10:31:26 +02:00
renovate[bot]
b538d09f88 chore(deps): update dependency vite to v6.2.6 2025-04-10 06:40:17 +00:00
Qubasa
b3dcf7f641 clan-cli: Change shellcheck to shellcheck-minimal 2025-04-10 01:54:00 +02:00
renovate[bot]
001fb36e87 chore(deps): update nix-darwin digest to 113883e 2025-04-09 19:20:14 +00:00
Qubasa
67a135e7bc formatter.nix: Exclude **/.mypy_cache/* 2025-04-09 19:44:00 +02:00
Qubasa
01439db065 formatter.nix: Exclude **/node_modules/* 2025-04-09 19:44:00 +02:00
Qubasa
f1855f80fc clan-cli: Add shellcheck as a runtimeDependencie 2025-04-09 19:44:00 +02:00
RTUnreal
f4f7df312d checks: fix shellcheck errors 2025-04-09 19:44:00 +02:00
RTUnreal
aad1c347d1 clanModules: fix shellcheck errors 2025-04-09 19:44:00 +02:00
RTUnreal
ee5957d8ee pkgs/clan-cli: fix test which are using vars shellcheck 2025-04-09 19:44:00 +02:00
RTUnreal
91cb641efe clanModules/borgbackup: fix shellcheck errors 2025-04-09 19:44:00 +02:00
RTUnreal
691a026929 clanModules/root-password: fix shellcheck errors 2025-04-09 19:44:00 +02:00
RTUnreal
83ec5a063a vars: use writeShellApplication to shellcheck generators 2025-04-09 19:44:00 +02:00
hsjobeki
519c6cc05a Merge pull request 'chore(clan/pytest): discover all test files in the tree' (#3269) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3269
2025-04-09 17:16:56 +00:00
Johannes Kirschbauer
de587648f8 chore(clan/pytest): discover all test files in the tree 2025-04-09 18:54:57 +02:00
hsjobeki
bf06bdb38a Merge pull request 'Reapply '(#3259) chore(buildClan): move machineClass option into inventory.machines submodule'' (#3268) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3268
2025-04-09 16:50:15 +00:00
Johannes Kirschbauer
ab9c0d2904 fix(clan/machines): move machineClass attribute selector and add a unit test for class detection 2025-04-09 18:29:43 +02:00
Johannes Kirschbauer
35379d3b86 Reapply "Merge pull request 'chore(buildClan): move machineClass option into inventory.machines submodule' (#3259) from hsjobeki/clan-core:buildclan-cleanup into main"
This reverts commit 62dfb23e41.
2025-04-09 18:16:35 +02:00
hsjobeki
61aebf75c8 Merge pull request 'fix(checks/inventory): use buildClan instead of buildInventory' (#3267) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3267
2025-04-09 16:14:06 +00:00
hsjobeki
d9c3af6c11 Merge pull request 'test(clan/inventory): test deserialization of different inventories' (#3258) from hsjobeki/clan-core:inventory-serde into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3258
2025-04-09 16:07:58 +00:00
Johannes Kirschbauer
c344d57298 fix(checks/data-mesher): format, dont pass a duplicate data-mesher module 2025-04-09 18:03:04 +02:00
Johannes Kirschbauer
d7a83343e5 test(clan/inventory): test deserialization of different inventories 2025-04-09 18:00:00 +02:00
Johannes Kirschbauer
ec2aee3013 fix(eval/inventory): fix some test arguments to buildInventory 2025-04-09 17:38:06 +02:00
Johannes Kirschbauer
6f7d7e8d98 chore(checks/inventory): regenerate test vars 2025-04-09 17:32:29 +02:00
Johannes Kirschbauer
ac940aa8a1 fix(checks/inventory): use buildClan instead of buildInventory 2025-04-09 17:31:35 +02:00
Johannes Kirschbauer
05c45371af feat(buildInventory): move instance resolution into buildInventory
Such that buildClan doesn't have to compose the results
buildInventory should be more self contained. But it is NOT meant a
public API! use buildClan argument 'inventory' instead
2025-04-09 17:31:35 +02:00
Mic92
fad4bfe593 Merge pull request 'speedup morph test' (#3266) from morph-test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3266
2025-04-09 15:28:20 +00:00
hsjobeki
11d88e51ab Merge pull request 'treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib'' (#3263) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3263
2025-04-09 15:10:42 +00:00
Jörg Thalheim
44a2643d17 speedup morph test 2025-04-09 17:06:34 +02:00
Jörg Thalheim
a714c72aff checks/morph: strip test prefix
this is making it consistent with otther tests.
2025-04-09 16:58:48 +02:00
Michael Hoang
1d346046dc Merge pull request 'chore(deps): update data-mesher digest to 81f65ea' (#3256) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3256
2025-04-09 14:53:32 +00:00
renovate[bot]
37dfb2ce93 chore(deps): update data-mesher digest to 81f65ea 2025-04-09 14:30:22 +00:00
renovate[bot]
4d655f3ce1 fix(deps): update tanstack-query monorepo to v5.72.2 2025-04-09 14:20:16 +00:00
Mic92
0516ef78a2 Merge pull request 'Revert "Merge pull request 'chore(buildClan): move machineClass option into inventory.machines submodule' (#3259) from hsjobeki/clan-core:buildclan-cleanup into main"' (#3264) from revert-machine-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3264
2025-04-09 14:11:21 +00:00
Jörg Thalheim
62dfb23e41 Revert "Merge pull request 'chore(buildClan): move machineClass option into inventory.machines submodule' (#3259) from hsjobeki/clan-core:buildclan-cleanup into main"
This reverts commit 11ba13df67, reversing
changes made to 04f9aa3ae0.
2025-04-09 16:08:39 +02:00
Mic92
b66317af04 Merge pull request 'feat(clan-cli): support multiple keys for a user' (#3230) from feat/vars-multiple-user-secrets into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3230
2025-04-09 13:05:24 +00:00
hsjobeki
11ba13df67 Merge pull request 'chore(buildClan): move machineClass option into inventory.machines submodule' (#3259) from hsjobeki/clan-core:buildclan-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3259
2025-04-09 12:57:48 +00:00
Johannes Kirschbauer
81211af474 fix(python/inventory): add machineClass field 2025-04-09 12:50:43 +00:00
Johannes Kirschbauer
68ca94d1ee chore(buildClan): move machineClass option into inventory.machines submodule 2025-04-09 12:50:43 +00:00
Mic92
04f9aa3ae0 Merge pull request 'checks/installation: restore the install without system aspect' (#3261) from flakiness into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3261
2025-04-09 11:39:17 +00:00
Jörg Thalheim
a6ea7b692d checks/installation: restore the install without system aspect 2025-04-09 11:32:28 +00:00
Brian McGee
ed5fc20069 feat(clan-cli): support multiple keys for a user 2025-04-09 09:58:58 +00:00
Mic92
7e5505bd71 Merge pull request 'installation: speed up by installing to localhost' (#3255) from flakiness into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3255
2025-04-09 09:58:43 +00:00
Jörg Thalheim
2942bae31b don't expose all clan-depenencies as their own check attributes
this is expensive in CI to display.
2025-04-09 09:52:56 +00:00
Jörg Thalheim
20f00c938f hardware: only include sshpass if we are actually using it. 2025-04-09 09:52:56 +00:00
Jörg Thalheim
5968ee1195 installation: use clan-cli-full so that nix doesn't try to evaluate deps 2025-04-09 09:52:56 +00:00
Jörg Thalheim
c2f7bf3fef checks/installation: move updating hardware configuration to it's own test
for some reason those are very slow. Moving them to their own test
breaks down the critical path.
2025-04-09 09:52:56 +00:00
Jörg Thalheim
7308af0a85 installation: speed up by installing to localhost
we test other types of installation already in nixos-anywhere so we can
speed up this test quite a bit by not having a seperate machine to
install to.
2025-04-09 09:36:46 +00:00
Johannes Kirschbauer
a6a79e83a0 treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib' 2025-04-09 11:32:46 +02:00
DavHau
476dcb4140 sops: prioritize SOPS_AGE_KEY_FILE over local key
... instead of loading both keys and raise an error

This is important for testing when one wants to override SOPS_AGE_KEY_FILE

New prio: `SOPS_AGE_KEY` > `SOPS_AGE_KEY_FILE` > `~/.config/sops/age/keys.txt`
2025-04-09 08:45:34 +00:00
DavHau
77ab4f7208 vars: add feature --no-sandbox
Raise warning if sandbox cannot be used -> request user to run with --no-sandbox
2025-04-09 15:02:20 +07:00
pinpox
cf874de094 Merge pull request 'Fix clan.service docs format' (#3254) from fix-service-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3254
2025-04-09 06:48:30 +00:00
Pablo Ovelleiro Corral
0d16ebf43e Fix clan.service docs format 2025-04-09 08:29:19 +02:00
renovate[bot]
bc098f7796 chore(deps): update nixpkgs digest to b2b0718 2025-04-09 06:10:32 +00:00
Mic92
157245b4b0 Merge pull request 'chore(deps): update disko digest to 76c0a6d' (#3252) from renovate/disko-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3252
2025-04-08 21:32:00 +00:00
Mic92
269cbd40fa Merge pull request 'chore(deps): update data-mesher digest to a592e34' (#3245) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3245
2025-04-08 21:31:08 +00:00
renovate[bot]
17f54e5297 chore(deps): update disko digest to 76c0a6d 2025-04-08 21:20:16 +00:00
renovate[bot]
3cbcc284c8 chore(deps): update data-mesher digest to a592e34 2025-04-08 21:20:13 +00:00
hsjobeki
b8d9b795ff Merge pull request 'docs(authoring/modules): add examples for dependency injection' (#3249) from hsjobeki/clan-core:docs-authoring into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3249
2025-04-08 21:10:52 +00:00
Johannes Kirschbauer
748cdb871e docs(authoring/modules): add examples for dependency injection 2025-04-08 20:56:02 +00:00
hsjobeki
39cf69a661 Merge pull request 'chore(lib/getModuleClass): remove unused library function' (#3250) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3250
2025-04-08 20:54:46 +00:00
Johannes Kirschbauer
c357cfa29f chore(lib/buildClan): remove dependencies {nixpkgs,nix-darwin} from the clanLib file 2025-04-08 22:13:46 +02:00
Johannes Kirschbauer
f399aad06e chore(lib/getModuleClass): remove unused library function 2025-04-08 22:09:10 +02:00
hsjobeki
2ad4cf8758 Merge pull request 'pkgs/cli: Move the test folder inside the python module' (#2973) from kenji/clan-core:split-testing-up into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2973
2025-04-08 20:06:59 +00:00
hsjobeki
f60da91dea Merge pull request 'docs(authoring): restructure authoring guides' (#3248) from hsjobeki/clan-core:docs-authoring into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3248
2025-04-08 19:58:59 +00:00
hsjobeki
aa75cc4777 Merge pull request 'chore(inventory/services): dont check _class in our logics. Let the error eccour in the final evaluation.' (#3236) from hsjobeki/clan-core:role-settings into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3236
2025-04-08 19:49:46 +00:00
Mic92
0e58ff85f5 Merge pull request 'devshells: name shells for clarity' (#3240) from Lehmanator/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3240
2025-04-08 19:45:20 +00:00
Johannes Kirschbauer
ac5effe435 fix(clan_app/test): fixup after rebase 2025-04-08 21:38:55 +02:00
Johannes Kirschbauer
b4f63b8835 docs(authoring): restructure authoring guides
Mainly because we have two module specs now and they will remain
valid for a while. We need to keep the older format documented for a while
2025-04-08 21:32:19 +02:00
Sam Lehman
e0a6ed3d49 devshells: name shells for clarity 2025-04-08 19:31:30 +00:00
Mic92
2c34f58a96 Merge pull request 'installation: use ip addresses to decrease flakiness' (#3247) from flakiness into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3247
2025-04-08 19:31:12 +00:00
Jörg Thalheim
ce4a646927 installation: use ip addresses to decrease flakiness 2025-04-08 21:19:47 +02:00
Mic92
89afec1532 Merge pull request 'flash: test existing mount with spaces' (#3243) from fix-mounting into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3243
2025-04-08 18:55:05 +00:00
Jörg Thalheim
c61c1af18e replace original installation test with installation-without-system 2025-04-08 20:41:31 +02:00
Johannes Kirschbauer
9af20ad8b5 chore(inventory/instances): don't eagerly test the service modules _class 2025-04-08 20:30:35 +02:00
Johannes Kirschbauer
f7d5a529aa chore(inventory/services): dont check _class of legacy clanModules.
Let the module system handle the error. Once we shift to deferred
modules, things get more complicated and we cannot check the module
class eagerly
2025-04-08 20:30:33 +02:00
Johannes Kirschbauer
cb001ec72b fix(clan_cli/tests): fix some imports after rebase 2025-04-08 20:26:38 +02:00
Jörg Thalheim
bbcc7f6e3b flash: test existing mount with spaces 2025-04-08 20:16:23 +02:00
Jörg Thalheim
a68f50fde3 bump disko to fix quoting issue 2025-04-08 20:16:22 +02:00
Johannes Kirschbauer
e9846d6cb9 Tests: reconfigure pytest test folder after moving it into clan_cli 2025-04-08 20:13:13 +02:00
Johannes Kirschbauer
5273304915 Tests: exclude test folder itself from autmatic dataclass checks 2025-04-08 20:12:03 +02:00
a-kenji
309c132b63 pkgs/cli: Move the test folder inside the python module
Move the `tests` folder to `clan_cli/tests`.

As we now want part of our tests to live next to the functions that are
tested - tests that are not in the `/tests` module also need access to
the configured test fixtures that are exposed by the `pytest_plugins`
declaration.

The following folder structure doesn't support this model:

```
├── clan_cli
│   ├── api
│   │    └── api_init_test.py
├── tests/
│   ├── conftest.py
│   └── ...
```

Here `api_init_test.py` even when importing the test functions will not
have the fixtures configured.

There is a way to configure python to import the fixtures from another
[`project/module`](https://docs.pytest.org/en/stable/how-to/fixtures.html#using-fixtures-from-other-projects), but this seems to *generally* be discouraged.

So moving the `conftest.py` to the toplevel and the `/tests` folder into
the toplevel seems to be a sensible choice choice.
2025-04-08 20:12:01 +02:00
hsjobeki
da164696ea Merge pull request 'doc(inventory): document experimental settingsExtend' (#3207) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3207
2025-04-08 18:10:04 +00:00
brianmcgee
f0bd7ecad6 Merge pull request 'chore: remove data-mesher from devshell' (#3239) from remove-data-mesher-from-devshell into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3239
2025-04-08 18:05:51 +00:00
Johannes Kirschbauer
821264fe2e fix(getModulesSchema): forward argument to evalClanModules 2025-04-08 19:53:20 +02:00
Brian McGee
f418ba0755 chore: remove data-mesher from devshell 2025-04-08 19:51:11 +02:00
Michael Hoang
a503c92c3e Merge pull request 'flake-parts: ensure flake.darwinConfigurations is mergeable' (#3244) from push-zurymrrrxwur into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3244
2025-04-08 17:20:16 +00:00
renovate[bot]
ce023a9fe0 chore(deps): lock file maintenance 2025-04-08 17:10:45 +00:00
Michael Hoang
1079fb7812 flake-parts: remove unnecessary mkSubmoduleOptions
This is no longer necessary as of https://github.com/NixOS/nixpkgs/pull/156533.
2025-04-08 19:03:29 +02:00
Michael Hoang
88669ec19c flake-parts: ensure flake.darwinConfigurations is mergeable
We didn't run into issues previously for `nixosConfigurations` because
there is already a [flake-parts module] that creates the option inside
`flake`.

[flake-parts module]: https://github.com/hercules-ci/flake-parts/blob/main/modules/nixosConfigurations.nix
2025-04-08 19:03:29 +02:00
renovate[bot]
e781741023 fix(deps): update tanstack-query monorepo to v5.72.1 2025-04-08 16:50:21 +00:00
renovate[bot]
d3fee5000a chore(deps): update nixpkgs digest to b0b4b5f 2025-04-08 16:10:09 +00:00
Mic92
b7cf63344c Merge pull request 'sops: fix compatibility with new format' (#3242) from directory-context into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3242
2025-04-08 16:05:43 +00:00
Jörg Thalheim
259983c99f bump disko to fix quoting issue 2025-04-08 17:45:48 +02:00
Jörg Thalheim
57203c3d15 sops: fix compatibility with new format
The new format can have null values now.
2025-04-08 17:44:23 +02:00
DavHau
96db83a08b inventory tests: generate vars for dummy test 2025-04-08 21:06:23 +07:00
DavHau
a493d53b84 data-mesher: generate vars for test vis update-vars.py 2025-04-08 20:54:11 +07:00
DavHau
d38d6ac167 data-mesher: use inventory test framework for vars 2025-04-08 20:54:11 +07:00
DavHau
968fe4b64e inventory tests: add vars support
- Add support for leading vars
- Extend test to test for vars support
- Improve update-vars.py to take test name as argument
2025-04-08 20:54:11 +07:00
Johannes Kirschbauer
1b3ce7ebd4 docs(inventory): improve extendSettings docs 2025-04-08 15:46:13 +02:00
Johannes Kirschbauer
ce84c4cddb chore(lib/modulesDocs): move dependency on clan-core and pkgs into function args
This is a good idea, to make lib agnostic from clan-core
The next step could be to rename the clan-core argument name
Or to explizitly pass the actual dependencies, instead of everything in
clan-core
2025-04-08 15:30:49 +02:00
Johannes Kirschbauer
97049d187c doc(inventory): document experimental settings vendoring 2025-04-08 15:24:12 +02:00
renovate[bot]
39942ab3b4 chore(deps): update sops-nix digest to 69d5a5a 2025-04-08 12:50:12 +00:00
hsjobeki
411440ef35 Merge pull request 'feat(inventory/instances): add extendSettings as argument to perInstance, perMachine' (#3233) from hsjobeki/clan-core:role-settings into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3233
2025-04-08 12:46:44 +00:00
Johannes Kirschbauer
07e6df35a5 feat(inventory/instances): dont set module location to allow underlying error location to bubble up 2025-04-08 14:36:29 +02:00
renovate[bot]
8da94a59bf chore(deps): update data-mesher digest to 302252a 2025-04-08 12:10:12 +00:00
Mic92
8fad1df70b Merge pull request 'directory-context' (#3234) from directory-context into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3234
2025-04-08 12:09:36 +00:00
Jörg Thalheim
f008da9472 inventory: don't loose string context of directory 2025-04-08 13:50:27 +02:00
Johannes Kirschbauer
4913d2db87 feat(inventory/instances): add extendSettings as argument to perInstance, perMachine 2025-04-08 13:15:06 +02:00
Mic92
8fe56def2b Merge pull request 'user-password: fix variables beeing incorrect' (#3229) from user-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3229
2025-04-08 10:16:15 +00:00
Mic92
dc6de67ed7 Merge pull request 'docs-errata' (#3161) from docs-errata into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3161
2025-04-08 10:00:53 +00:00
Brian McGee
9d6dfbd3e9 fix(docs): add the requirement to export clan.templates in flake outputs to migration guide 2025-04-08 10:44:36 +01:00
Brian McGee
0c7cf305e2 fix(docs): tighten up validation for meta.name and improved description 2025-04-08 10:44:35 +01:00
Brian McGee
7493ab3e59 fix(docs): correct flake sample in migration guide
diff --git a/docs/site/manual/migration-guide.md b/docs/site/manual/migration-guide.md
index 551a3ef0..38be9a0e 100644
--- a/docs/site/manual/migration-guide.md
+++ b/docs/site/manual/migration-guide.md
@@ -77,13 +77,18 @@ For the provide flake example, your flake should now look like this:
 ```nix
 {
   inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+
+  inputs.clan-core = {
+    url = "git+https://git.clan.lol/clan/clan-core";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };

-  outputs = { self, nixpkgs, ... }:
+  outputs = { self, nixpkgs, clan-core, ... }:
   let
     clan = clan-core.lib.buildClan {
         self = self; # this needs to point at the repository root
         specialArgs = {};
-        inventory.meta.name = "NEEDS_TO_BE_UNIQUE"; # TODO: Changeme
+        meta.name = throw "Change me to something unique";

         machines = {
             berlin = {
2025-04-08 10:44:33 +01:00
Jörg Thalheim
aa8f7bd6ac user-password: fix variables beeing incorrect 2025-04-08 09:37:05 +00:00
Jörg Thalheim
6dc0f6b91d user-password: fix variables beeing incorrect 2025-04-08 11:36:43 +02:00
Mic92
87f7bd5651 Merge pull request 'user-password: migrate to vars' (#3227) from user-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3227
2025-04-08 08:44:32 +00:00
Jörg Thalheim
9436a451f7 installation: use networkd everywhere 2025-04-08 10:33:48 +02:00
Jörg Thalheim
76c7858d3f user-password: migrate to vars 2025-04-08 10:16:59 +02:00
DavHau
9a34977842 inventory tests: generalize update-vars.py
... and move to pkgs/scripts/
2025-04-08 07:45:30 +00:00
Michael Hoang
562b611193 Merge pull request 'build-clan: support constructing darwinConfigurations' (#3115) from mac into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3115
2025-04-08 07:44:09 +00:00
Michael Hoang
67745e1b27 tests: add --show-trace to nix-unit tests 2025-04-08 08:53:29 +02:00
Michael Hoang
72ed0e258a cli: don't update macOS machines 2025-04-08 08:53:29 +02:00
Michael Hoang
6de4735c81 build-clan: support constructing darwinConfigurations 2025-04-08 08:53:29 +02:00
Michael Hoang
66e4c41142 lib/jsonschema: fix enum support 2025-04-08 08:53:27 +02:00
Michael Hoang
94c7834ac7 flake: add nix-darwin 2025-04-08 07:39:49 +02:00
renovate[bot]
e05da71e68 chore(deps): update typescript-eslint monorepo to v8.29.1 2025-04-07 17:20:17 +00:00
DavHau
1665b777ec data-mesher: use new test framework 2025-04-07 20:43:19 +07:00
DavHau
b9e1b109a8 inventory tests: improve framework to set better defaults 2025-04-07 19:58:53 +07:00
DavHau
60133015f5 add CLAN_NO_COMMIT env var to disable committing
This is required when calling vars generators for generating vars for
tests
2025-04-07 18:59:19 +07:00
renovate[bot]
a10527a69d fix(deps): update tanstack-query monorepo to v5.72.0 2025-04-07 09:40:15 +00:00
renovate[bot]
3c15d2e3d8 chore(deps): update data-mesher digest to aea65b1 2025-04-07 07:20:13 +00:00
renovate[bot]
ddce636e3b chore(deps): update data-mesher digest to 54bbd42 2025-04-07 00:40:13 +00:00
renovate[bot]
fb8286b297 chore(deps): update sops-nix digest to 523f58a 2025-04-06 07:10:20 +00:00
renovate[bot]
274f4e318c chore(deps): update data-mesher digest to 3239dc2 2025-04-06 06:50:09 +00:00
Mic92
e0b14bc21c Merge pull request 'only compute final_script and validation hashes once' (#3206) from fix-eval into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3206
2025-04-05 06:44:28 +00:00
renovate[bot]
423bf6f17b chore(deps): update dependency typescript to v5.8.3 2025-04-05 00:20:15 +00:00
renovate[bot]
e2dda487a2 chore(deps): update dependency eslint to v9.24.0 2025-04-04 19:40:15 +00:00
renovate[bot]
d688250967 chore(deps): update dependency @eslint/js to v9.24.0 2025-04-04 19:00:15 +00:00
Jörg Thalheim
64346bacc8 only compute final_script and validation hashes once 2025-04-04 18:31:12 +02:00
Jörg Thalheim
7ed669a093 don't use python3 in python's callPackage scope 2025-04-04 18:31:12 +02:00
Mic92
51c347bd5f Merge pull request 'ssh/upload: fix shell quoting' (#3205) from default-groups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3205
2025-04-04 15:27:17 +00:00
Jörg Thalheim
0f4c897d41 ssh/upload: fix shell quoting 2025-04-04 15:10:09 +00:00
renovate[bot]
3cadd0849a fix(deps): update dependency @tanstack/solid-query to v5.71.10 2025-04-04 13:00:15 +00:00
hsjobeki
b0d8d1f195 Merge pull request 'chore(lib/select): move into subfolder with a test file' (#3175) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3175
2025-04-04 12:32:32 +00:00
Johannes Kirschbauer
f326c307eb feat(lib/inventory): fix arguments discrepancy on perInstance and perMachine 2025-04-04 14:22:36 +02:00
Johannes Kirschbauer
6c8d2d3cb5 docs(inventory/instances): init guide for setting up the new service model 2025-04-04 14:22:35 +02:00
Johannes Kirschbauer
6d4bbc3e92 chore(lib/select): init simple test 2025-04-04 14:06:05 +02:00
renovate[bot]
74f66e199e chore(deps): update sops-nix digest to cff8437 2025-04-04 09:00:32 +00:00
renovate[bot]
fb384bd261 chore(deps): update treefmt-nix digest to 815e412 2025-04-04 08:40:26 +00:00
renovate[bot]
95a860bd29 chore(deps): update sops-nix digest to 9bc9b59 2025-04-04 08:20:25 +00:00
renovate[bot]
17354a6341 chore(deps): update data-mesher digest to 7656e00 2025-04-04 08:00:13 +00:00
renovate[bot]
b4f8eea673 chore(deps): update data-mesher digest to d4464c9 2025-04-03 23:50:09 +00:00
renovate[bot]
9c744f1e0e chore(deps): update data-mesher digest to faaaf66 2025-04-03 22:20:26 +00:00
renovate[bot]
173c0f5dac fix(deps): update dependency @tanstack/solid-query to v5.71.9 2025-04-03 22:00:14 +00:00
renovate[bot]
f62a109364 chore(deps): update actions/create-github-app-token action to v2 2025-04-03 19:50:10 +00:00
renovate[bot]
1c0a2a0fa2 fix(deps): update dependency @tanstack/solid-query to v5.71.8 2025-04-03 16:40:15 +00:00
renovate[bot]
3f651dbfbd chore(deps): update data-mesher digest to 83cc954 2025-04-03 12:20:13 +00:00
Mic92
84b104115d Merge pull request 'docs/secrets: mention defaultGroups option' (#3193) from default-groups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3193
2025-04-03 12:12:01 +00:00
Jörg Thalheim
f1cd85f281 docs/secrets: mention defaultGroups option 2025-04-03 14:02:05 +02:00
renovate[bot]
d978278733 chore(deps): update treefmt-nix digest to 57dabe2 2025-04-03 11:30:11 +00:00
DavHau
9682a22c9a update nixos-facter-modules for bugfix 2025-04-03 17:31:32 +07:00
DavHau
ccaf67e477 inventory tests: set machine.name automatically 2025-04-03 17:29:07 +07:00
DavHau
2ed69d7ef8 workaround bug in docs rendering if machine.name is not set 2025-04-03 17:29:07 +07:00
DavHau
a88167f456 remove some references to config in options 2025-04-03 17:29:07 +07:00
DavHau
e897399e34 remove definitions of clan.core.settings.machine.name on tests 2025-04-03 17:29:07 +07:00
DavHau
73d14e078e remove default for clan.core.settings.machine.name and make readOnly
There is not reason that there needs to be a default. Machines are usually defined as an attrset, so there is no reason to have a default.
Also make this readOnly as we never want to override it.
2025-04-03 17:29:07 +07:00
renovate[bot]
51d39a4c8c chore(deps): update dependency vite to v6.2.5 2025-04-03 10:00:27 +00:00
renovate[bot]
2900c8c210 chore(deps): update nixos-facter-modules digest to 58ad969 2025-04-03 09:40:14 +00:00
renovate[bot]
77ebd5a513 fix(deps): update tanstack-query monorepo 2025-04-03 08:40:30 +00:00
renovate[bot]
9e73001ffb chore(deps): update dependency @types/node to v22.14.0 2025-04-03 08:20:25 +00:00
renovate[bot]
a178769063 chore(deps): update data-mesher digest to 9959605 2025-04-03 08:00:24 +00:00
renovate[bot]
25b985ac01 chore(deps): update disko digest to 329d3d7 2025-04-03 07:40:29 +00:00
renovate[bot]
fe02063555 chore(deps): update sops-nix digest to 4521de6 2025-04-03 07:10:16 +00:00
Michael Hoang
907650610b Merge pull request 'networking: don't set targetHost if there's only a hostname' (#3184) from push-ovzouzrtzkpx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3184
2025-04-03 07:07:38 +00:00
Michael Hoang
4442dbd871 networking: don't set targetHost if FQDN is not set
This will change in the future once we finish the networking Clan module
and we'll have a reliable way of addressing every node automagically.
Until then, this will have to do.
2025-04-03 08:43:10 +02:00
Michael Hoang
81ad9a5e4a Merge pull request 'cli: improve --help documentation' (#3186) from push-qnptotlvsnyq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3186
2025-04-03 06:39:29 +00:00
Michael Hoang
bbe12002d8 cli: managed by clan -> managed by Clan 2025-04-03 00:25:51 +09:00
Michael Hoang
2db14e0ffa cli: machines update [MACHINE] -> machines update [MACHINES] 2025-04-03 00:25:51 +09:00
Johannes Kirschbauer
788d9b9670 feat(inventory/instances): prevent modules without explizit class from beeing used 2025-04-02 14:57:21 +02:00
Johannes Kirschbauer
0ec63de3e6 feat(buildClan): add clan.modules as output 2025-04-02 13:38:38 +02:00
renovate[bot]
6ccdfe278d chore(deps): update data-mesher digest to fd8dd31 2025-04-02 11:20:28 +00:00
renovate[bot]
2ba8b7ec3b chore(deps): update treefmt-nix digest to 18bed67 2025-04-02 11:00:15 +00:00
Johannes Kirschbauer
2efe1ae241 chore(lib/introspection): add comment about upstream PRs, that allows removing features 2025-04-02 12:38:28 +02:00
Johannes Kirschbauer
69078433cd chore(lib/select): move into subfolder with a test file 2025-04-02 12:37:49 +02:00
renovate[bot]
7825fe981f fix(deps): update dependency @tanstack/solid-query to v5.71.3 2025-04-02 10:00:15 +00:00
hsjobeki
4dde845c4d Merge pull request 'lib-cleanup' (#3173) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3173
2025-04-02 09:34:47 +00:00
Johannes Kirschbauer
2715c398cc fix(inventory/interface): use explizit file dependency, until dependency injection works properly 2025-04-02 11:12:16 +02:00
Johannes Kirschbauer
2ab53b05fe chore(lib/treewide): cleanup directory struture of lib. See lib/readme.md for details 2025-04-02 11:11:21 +02:00
hsjobeki
ee96df8c53 Merge pull request 'chore(buildClan): remove dependency on clan-core in the lib function' (#3167) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3167
2025-04-02 09:09:28 +00:00
Johannes Kirschbauer
975390f948 fix(test/vars): include lib into test closure 2025-04-02 10:31:16 +02:00
Johannes Kirschbauer
f842023ea3 chore(lib/readme): use real-world example for directory structure vision 2025-04-02 09:56:30 +02:00
Johannes Kirschbauer
81898996f4 chore(buildClan): make buildClan and flake-parts return identical outputs 2025-04-02 09:56:28 +02:00
Johannes Kirschbauer
3fdcb4e5cc fix(computed-tags): typo 2025-04-02 09:49:54 +02:00
Johannes Kirschbauer
2b392866d6 chore(buildClan): remove dependency on clan-core in the lib function 2025-04-02 09:49:54 +02:00
renovate[bot]
3fab3e60d7 chore(deps): update data-mesher digest to a0c39f6 2025-04-02 03:30:10 +00:00
renovate[bot]
f9fe6006a8 chore(deps): update data-mesher digest to 463cc58 2025-04-02 02:10:11 +00:00
renovate[bot]
2a1ce79cf6 chore(deps): update flake-parts digest to c621e84 2025-04-01 23:50:10 +00:00
renovate[bot]
337876293b chore(deps): update dependency @types/node to v22.13.17 2025-04-01 16:40:29 +00:00
renovate[bot]
6040479ce1 chore(deps): update disko digest to b36e876 2025-04-01 16:30:11 +00:00
hsjobeki
898a11cd3d Merge pull request 'chore(lib/buildClan): clean up and turn into a 'module'' (#3166) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3166
2025-04-01 14:46:44 +00:00
Johannes Kirschbauer
11701d5607 feat(lib/buildClan): turn lib/build-clan into a 'buildClanModule' with sub-features such as 'buildClan' and 'flakePartsModule' 2025-04-01 15:39:12 +02:00
Johannes Kirschbauer
9a7ab66b3b chore(buildClan): set clanInternals.modules to clanInternals.clanModules 2025-04-01 15:36:37 +02:00
renovate[bot]
c8a45527e3 fix(deps): update dependency @tanstack/solid-query to v5.71.2 2025-04-01 13:00:29 +00:00
renovate[bot]
91bcdf8206 chore(deps): update sops-nix digest to e7f4d7e 2025-04-01 12:40:18 +00:00
Johannes Kirschbauer
ffaf87b881 chore(buildClan): rename eval.nix to function-adapter.nix to make its shallows purpose more clear 2025-04-01 14:33:55 +02:00
hsjobeki
de9b42be2f Merge pull request 'feat(inventory): remove tag settings for now' (#3158) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3158
2025-04-01 12:30:25 +00:00
renovate[bot]
f3b3f638a9 chore(deps): update data-mesher digest to 17c0fea 2025-04-01 12:00:14 +00:00
Johannes Kirschbauer
84cd0d0310 test(inventory/instnces): add tests for 'perInstance' arguments 2025-04-01 12:50:04 +02:00
renovate[bot]
d497975cea chore(deps): update dependency solid-devtools to ^0.34.0 2025-04-01 10:20:21 +00:00
renovate[bot]
7ace37dfa0 chore(deps): update dependency @types/node to v22.13.16 2025-04-01 09:40:17 +00:00
Johannes Kirschbauer
f1eb08d224 feat(inventory): remove tag settings for now 2025-04-01 11:04:51 +02:00
renovate[bot]
f99776d4b1 chore(deps): update sops-nix digest to 49cffb8 2025-04-01 08:30:12 +00:00
renovate[bot]
559cd19274 chore(deps): update data-mesher digest to 8663e47 2025-04-01 07:10:10 +00:00
renovate[bot]
f2a0dc8b8b chore(deps): update dependency @types/node to v22.13.15 2025-04-01 05:40:15 +00:00
Luis Hebendanz
bf91ba26b6 Merge pull request 'clan-cli: Fix deployment as non root edgecase' (#3153) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3153
2025-03-31 18:37:59 +00:00
Qubasa
6f13b3a29c clan-cli: Fix deployment as non root edgecase 2025-03-31 20:25:05 +02:00
renovate[bot]
081460750d chore(deps): update typescript-eslint monorepo to v8.29.0 2025-03-31 17:20:16 +00:00
renovate[bot]
b600968aad chore(deps): update nixpkgs digest to 63158b9 2025-03-31 16:50:20 +00:00
renovate[bot]
685b460d7e chore(deps): update data-mesher digest to fbacb64 2025-03-31 16:30:10 +00:00
renovate[bot]
446ebb8e33 chore(deps): update dependency vitest to v3.1.1 2025-03-31 10:20:18 +00:00
renovate[bot]
c6f25ee58a fix(deps): update dependency @tanstack/solid-query to v5.71.1 2025-03-31 09:50:24 +00:00
renovate[bot]
0b7d15fefb chore(deps): update dependency vite to v6.2.4 2025-03-31 09:40:16 +00:00
DavHau
d53b62170a inventory test framework: init
Add nixos test module checks/lib/test-inventory-nix

accepts new option `inventory` and creates machines accordingly with correct imports
2025-03-31 13:39:23 +07:00
renovate[bot]
dcb2231332 chore(deps): update data-mesher digest to bf8c544 2025-03-31 00:20:25 +00:00
renovate[bot]
725eeb87ae chore(deps): lock file maintenance 2025-03-31 00:00:41 +00:00
hsjobeki
66df677fd2 Merge pull request 'chore(lib): prepare for refactoring into clanLib' (#3141) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3141
2025-03-30 15:51:17 +00:00
Johannes Kirschbauer
f7d15215ea feat(clanLib): expose clanInternals.clanLib
This is usefully for:
- As api via python
- for testing clanLib downstream
2025-03-30 17:07:11 +02:00
Johannes Kirschbauer
c25574bebd fix(lib/evalClan): evalClan is an explizit lib attribute 2025-03-30 17:07:11 +02:00
Johannes Kirschbauer
fe5796ba17 feat(inventory/instances): only warn if instances is populated 2025-03-30 17:07:11 +02:00
Johannes Kirschbauer
f2e89d27fe feat(lib/inventory): use clanLib instead of clan-core as internal specialArg. This has the benefit of beeing more narrow scoped. 2025-03-30 17:07:09 +02:00
Johannes Kirschbauer
06dd2ebf8c feat(lib/modules): remove dependency on self 2025-03-30 16:12:01 +02:00
Johannes Kirschbauer
40740860c0 feat(lib): init callLib; helper to bootstrap clanLib 2025-03-30 16:11:04 +02:00
Johannes Kirschbauer
89bc39869c chore(lib): prepare for refactoring into clanLib 2025-03-30 15:56:54 +02:00
hsjobeki
84d0a2f2f0 Merge pull request 'enable clan services for machines' (#3134) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3134
2025-03-30 13:54:11 +00:00
Johannes Kirschbauer
1d07737989 docs(lib): init readme with folder and testing conventions 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
9d386485dd chore(auto-imports): Remove the auto-import feature. There will be a replacement, to make imports explicit" 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
ee9ae9c76d fix(eval/tests): distributed-services: don't abort on warn in tests" 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
d4d4d77d2d fix(tests): include 'lib' always as a whole 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
c0ebad1cd9 feat(inventory/instances): add wip warning 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
86d0c95da7 feat(inventory/instances): improve error location 2025-03-30 15:29:05 +02:00
Johannes Kirschbauer
0fb1b5c5ce feat(inventory/instances): add service result to nixos machines 2025-03-30 15:29:05 +02:00
renovate[bot]
dc0349e835 fix(deps): update dependency @tanstack/solid-query to v5.71.0 2025-03-30 13:00:14 +00:00
renovate[bot]
cc8a74b195 chore(deps): update data-mesher digest to 4d139ac 2025-03-30 09:50:10 +00:00
renovate[bot]
046fe0df36 chore(deps): update nixpkgs digest to eb0e0f2 2025-03-30 09:10:24 +00:00
lassulus
3f948fdbd4 Merge pull request 'Make Generator validation more dynamic' (#3052) from tangential/clan-core:dynamic-vars-generator-validation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3052
2025-03-30 07:00:43 +00:00
Jonathan Thiessen
eb35e6ea21 Make Generator's validation dynamic
* Switch `Generator`'s `validation` from a regular property to
  an `@property` annotated method backed by `Machine`'s `eval_nix()`.
* Ensure that `Machine`'s flake cache is flushed after each
  effectful generator execution (rather than only after all
  generators have been executed).
2025-03-30 04:33:30 +00:00
Jonathan Thiessen
4a0e1b3b6b Add dependent vars generator dynamic validation test 2025-03-30 04:33:30 +00:00
Jonathan Thiessen
1b8974d167 Fix cached None support in FlakeCacheEntry
Previously, you could cache None values; however,
insertion wasn't idempotent/identical reinsertion
would lead to errors due to missing None checks.
2025-03-30 04:33:30 +00:00
Jonathan Thiessen
5e2b5fe213 Add overlapping (consistent) flake cache insert test
* Additionally, update `insert`'s input type hint to support None values
  (as they are already selectable and (one shot) insertable).
  This is necessary to appease the linter wrt the added test.
2025-03-30 04:33:30 +00:00
renovate[bot]
74fb3abbc7 chore(deps): update sops-nix digest to 8e87388 2025-03-30 04:00:13 +00:00
Luis Hebendanz
f2b04e74f1 Merge pull request 'clan-cli: Fix deployment as non root with a buildHost set' (#3132) from Qubasa/clan-core:fix_target_host_as_non_root into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3132
2025-03-29 16:56:49 +00:00
hsjobeki
d3ae684575 Merge pull request 'init inventory.instances and clan.service modules' (#3102) from hsjobeki/clan-core:clan-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3102
2025-03-29 16:22:30 +00:00
Johannes Kirschbauer
5b294e7651 chore(ui): ignore type error in unfinished features 2025-03-29 16:45:05 +01:00
Johannes Kirschbauer
40ae510075 test(inventory/legacy): don't need to support clanModules 2025-03-29 16:35:43 +01:00
Johannes Kirschbauer
48d910f11f fix(auto-imports): disable since this is not needed anymore and causing collision with the new module type 2025-03-29 16:24:48 +01:00
renovate[bot]
f242b9a35c chore(deps): update data-mesher digest to 734883c 2025-03-29 15:20:14 +00:00
Johannes Kirschbauer
978822d40a test(inventory/instances): add tests for per machine resolution 2025-03-29 15:40:31 +01:00
Johannes Kirschbauer
fa6c3be21e feat(inventory/instances): preserve settings modifiers close at source 2025-03-29 15:39:02 +01:00
brianmcgee
be61bac9af Merge pull request 'data-mesher-module' (#3086) from data-mesher-module into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3086
2025-03-29 14:07:42 +00:00
Pablo Ovelleiro Corral
42b58910a9 data-mesher: init module
Co-authored-by: Brian McGee <brian@bmcgee.ie>
2025-03-29 13:49:41 +00:00
Johannes Kirschbauer
a746b10578 chore: add description to {manifest, name} option 2025-03-29 14:33:44 +01:00
Johannes Kirschbauer
19341e4cb1 chore: format test, remove unused attributes 2025-03-29 14:27:52 +01:00
Johannes Kirschbauer
f4e06271ba chore: rename unused attributes in inventory adapter 2025-03-29 14:27:27 +01:00
Johannes Kirschbauer
d93fe229b3 chore: remove unused attributes from flake-module 2025-03-29 14:27:04 +01:00
Johannes Kirschbauer
5fc62806b1 feat(classgen): convert only certain attributes 2025-03-29 14:22:34 +01:00
Johannes Kirschbauer
e0be2f3435 fix(cli/inventory): update classes 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
a69b81488b fix(inventory/instances): fix jsonschema compatibility 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
b133a2407a feat(clan/services): init recursive service module 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
68ae27899a feat(clan/services): init test-suite for eval test 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
b83d3ecba2 feat(clan/services): init adapter function to convert inventory instances into clan.service module configurations 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
bec4317709 feat(inventory/instances): init instances as new attribute for adding distributed services 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
f37f15c482 feat(clan/services): init new clanInternals attribute 'distributedServices' 2025-03-29 13:25:19 +01:00
Johannes Kirschbauer
fae8ec318d feat(inventory/modules): allow inline modules 2025-03-29 13:25:19 +01:00
Qubasa
8e2005f38c clan-cli: Fix deployment as non root with a buildHost set 2025-03-28 18:47:36 +01:00
Mic92
94781bb358 Merge pull request 'clan_cli: fix support for non-root deployment user (from rtunreal)' (#3124) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3124
2025-03-28 17:26:33 +00:00
Jörg Thalheim
de740cf686 tests: add fake_sudo to sshd fixture
This allows to use the same code for both testing and real-world.
2025-03-28 17:14:22 +00:00
Qubasa
064edf61ef test_secrets_upload: Don't prepend sudo inside test; Improve secret upload test 2025-03-28 17:14:22 +00:00
renovate[bot]
aaf58d7be8 chore(deps): update treefmt-nix digest to 29a3d7b 2025-03-28 15:50:19 +00:00
renovate[bot]
03f8e41291 chore(deps): update nixpkgs digest to 6c59633 2025-03-28 15:30:25 +00:00
renovate[bot]
43bd4403c6 fix(deps): update dependency @tanstack/solid-query to v5.70.0 2025-03-28 15:20:17 +00:00
renovate[bot]
ebee55ffdc chore(deps): update nixpkgs digest to 25d1b84 2025-03-27 03:30:23 +00:00
renovate[bot]
47e9e5a8f0 chore(deps): update dependency @types/node to v22.13.14 2025-03-27 03:20:15 +00:00
615 changed files with 19008 additions and 7781 deletions

View File

@@ -0,0 +1,29 @@
name: "Update pinned clan-core for checks"
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "51 2 * * *"
jobs:
update-pinned-clan-core:
runs-on: nix
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update clan-core for checks
run: nix run .#update-clan-core-for-checks
- name: Create pull request
run: |
git commit -am ""
git push origin HEAD:update-clan-core-for-checks
curl -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"head": "update-clan-core-branch",
"base": "main",
"title": "Automated Update: Clan Core",
"body": "This PR updates the pinned clan-core for checks."
}' \
"${GITEA_SERVER_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/pulls"

View File

@@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/create-github-app-token@v1
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}

7
.gitignore vendored
View File

@@ -14,8 +14,12 @@ example_clan
nixos.qcow2
**/*.glade~
/docs/out
/pkgs/clan-cli/clan_cli/select
**/.local.env
# MacOS stuff
**/.DS_store
# dream2nix
.dream2nix
@@ -39,3 +43,6 @@ repo
node_modules
dist
.webui
# TODO: remove after bug in select is fixed
select

2
CODEOWNERS Normal file
View File

@@ -0,0 +1,2 @@
nixosModules/clanCore/vars/.* @lopter
pkgs/clan-cli/clan_cli/(secrets|vars)/.* @lopter

64
checks/admin/default.nix Normal file
View File

@@ -0,0 +1,64 @@
{
pkgs,
self,
clanLib,
...
}:
let
public-key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII6zj7ubTg6z/aDwRNwvM/WlQdUocMprQ8E92NWxl6t+ test@test";
in
clanLib.test.makeTestClan {
inherit pkgs self;
nixosTest = (
{ ... }:
{
name = "admin";
clan = {
directory = ./.;
modules."@clan/admin" = ../../clanServices/admin/default.nix;
inventory = {
machines.client = { };
machines.server = { };
instances = {
ssh-test-one = {
module.name = "@clan/admin";
roles.default.machines."server".settings = {
allowedKeys.testkey = public-key;
};
};
};
};
};
nodes = {
client.environment.etc.private-test-key.source = ./private-test-key;
server = {
services.openssh = {
enable = true;
settings.UsePAM = false;
};
};
};
testScript = ''
start_all()
machines = [client, server]
for m in machines:
m.systemctl("start network-online.target")
for m in machines:
m.wait_for_unit("network-online.target")
client.succeed(f"ssh -F /dev/null -i /etc/private-test-key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes root@server true &>/dev/null")
'';
}
);
}

View File

@@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACCOs4+7m04Os/2g8ETcLzP1pUHVKHDKa0PBPdjVsZerfgAAAJDXdRkm13UZ
JgAAAAtzc2gtZWQyNTUxOQAAACCOs4+7m04Os/2g8ETcLzP1pUHVKHDKa0PBPdjVsZerfg
AAAECIgb2FQcgBKMniA+6zm2cwGre60ATu3Sg1GivgAqVJlI6zj7ubTg6z/aDwRNwvM/Wl
QdUocMprQ8E92NWxl6t+AAAAC3BpbnBveEBraXdpAQI=
-----END OPENSSH PRIVATE KEY-----

View File

@@ -0,0 +1,6 @@
[
{
"publickey": "age1q4e7nsw5z6mqeqk5u5kug8lwhpq3f276s0t0npwfffwdkfh58gkqxknhjg",
"type": "age"
}
]

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:ET/FggP6t7L60krfVRvtMjv++xr3zqRsJ58AfnPS1zjTovV5tE9RgnboGY1ieS7fCs4VOL2S6ELtwV1+BTLDQX9s0c5A9cKqjnc=,iv:6EQ6DOqxUdHcOziTxf8kl0sp1Pggu720s5BJ8zA9Je0=,tag:hQMPWaWb4igqDYjwNehlqQ==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRWjhuZkgwNEZTL3JXZHFE\nTC9jSXJGcVd2bnkvOE1qV0d6TzNobFZobndvCmF1UmhVUWtKeVVwS29NY21ONkRn\nZU5sM01kTU9rQVNENi9paUFWbERoWnMKLS0tIEdjZzgwQjFtWlVtRGZwdW9GY0FK\nSER1TTFNVGxFa0ZrclR4MitWVERiSGMK9DNLzlJZelcpP0klwSDMggTAy5ZVOmsZ\niuu8dXMSdIeTd7l8rpZZN27BaKUm8yEDpUmot5Vq9rbZl6SO3ncX+A==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-07T11:45:41Z",
"mac": "ENC[AES256_GCM,data:m8eTnPtMzrooEah43mvjwHxQIwR/aq+A1wYyG/rQ75COq/TQepfMiDSrCJKW8x+OKmN/3HZs1b9k659jNNMF+RtMag0+/ovTmr7PQux3IkzWl+R2kU3Y7WDOMweBKY3mTMu6reICE1YVME8vJwhDDbA5JCXJv64rkTz2tfGt4CQ=,iv:/vrwJyEVsfm1cUK//TesY24Makt8YI8mwx5GIhn4038=,tag:H2tS9ohvWJ4TWB6LghcZNg==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,4 @@
{
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"type": "age"
}

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICVVQjCEuryZii1LmJyjx9DX44eJh3qwTTEWlahYONsz nixbld@kiwi

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/server

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:yH7IQixe4nudnK4QOsr7VYoJ1YrVLP0Ufvgu7TNWSJnc55khKZHvQiDIlxzCIrAyMgUYwPNmrrZn9PZhgjAQZm7/o6SmP91Efb0yWM55o861El6v59yw0fseo3z6xAisjlg3KwTd5KMrRhzT0HzrjLn89SYRVh7DAWK+Cs7HVGvKVJ1E6AWiJmFPXIB7YaqJ7P4jZW9u7bEMCZabsRRqgS8dWXVXw9VS5ll4bNYQY4x5p2eg6e81zdeY2Y9Gbi5ty1Whqpzko2Pvggu6K4zUDXikM4lWggvIXzfrJA7HNE3xzXw94J45woj1y5FVOzn1Ve5kCc8PjVGaJ32poGkZiiD07kd5PxZuyVexREJpgz29lyB6nRJJeau4gpSG1VHOyNdwwBsBBm+zn6v2rlVzJPTlqmCV1+5UKf8JZKziIDFfi/78kSdtaeX+miJJvyDRkqNpQ7htEI0TAS8yQrkjWEIyaPAWQ2Usa8g1UrEftTlGUi/aMC2ob0qTLQQbhNhlSV/dImzI/qRMqSy2RWeS,iv:EuprKOFKzNLZrGlPtU2mEjmtNPNOcuVDbuvrtYyrerc=,tag:ny/q1AMHIQ8OgUNEE0Cc8w==,type:str]",
"sops": {
"age": [
{
"recipient": "age1q4e7nsw5z6mqeqk5u5kug8lwhpq3f276s0t0npwfffwdkfh58gkqxknhjg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLODFxUjREa2tOYW9xaHYw\nQlhWZ282UVhiOGRndk0xYnlCQWRYR01qS2hJCllySUZyblJmTkgyZXd5bjVINDBo\nbEhIWmxycVdOVW0xTUxkalF5Y1k2bXcKLS0tIGRRS1VqOG5sanh2dXR5a2FGeXRs\nK3ZUdERCdEkvMmt3ZndPZEM3QUxJZzAKutOr9jHPCL86zEdMWJ6YZmplcr4tDAcN\nncQfC5rddYDW+0y/crwepKTa2FZjQheOY7jobZanU19ai521hqDSVw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxc3NxNGhRYmU3eFNodDZ4\ndnNTeHFnNXBKbUxmNHBjRlFpNG0zdVNpS2d3CjhrOUlSQU5BZVlSdWR3dnNyODZO\nRFBKZWpwWHlOUW03OGlVZlRQUmMrMzQKLS0tIEd6ei9LU3ZFTzlWTUk1c3huS1RQ\nbG1vQzI4ODJkeFcyRnJaQWp1Wk9zSkUKXefMOk/ZT4P6DItfnM82RoOvX4SBn7Fn\nlAoMnSzaRCunDwq7ha05G45gcI2Wjv3urjt0tmdmrmTnFtBSSt23TQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-07T11:45:47Z",
"mac": "ENC[AES256_GCM,data:ORCANHbEX13O+zBVLOYyPxYIr1RS3NybTBb23ES7RbiGhSl2t/TXcfPWU5Smuqee0tfcrxL0u1FELZta4IysySW54JlD2907E9OUJWlQ6seOxADla4TMukW2pwhSsUJ9XfjEwC07zYB0alHzO3pY+LG3OAWzyhAlWzHlB5+WqIA=,iv:As+CjAJxKht0PJs3S2WWzho7UBqaUUltBIrYvlzBAbM=,tag:PSyUKaPZZNCxqd6XLPJSCw==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/server

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:5Fa0TQN/Whj311JZuVWXnp+2KJaNZPb/TOnP23T+KktulabcBA9go+/F+8wJbsEH2mf6UDq656p6C+kLIvfBFl2O/WwSOhsl23as9TLbgB6gBq73GjyV81VFsnLYNLHKMq+8nfJHM/WekA==,iv:n5vz3q5N6DplLWibdiCcYDdiN7q1VggzPoIYy9r2ZJw=,tag:FoGXrrJfjHZCUVTS2RESmw==,type:str]",
"sops": {
"age": [
{
"recipient": "age1q4e7nsw5z6mqeqk5u5kug8lwhpq3f276s0t0npwfffwdkfh58gkqxknhjg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBheXZvUW9YbjBFMi9mZnVk\ncGFPQzFOZkNPMU1HckhtSGtDWExpWVNYRlV3CjdDaDlSd2wzVnhKZGU0aFY0UnZY\nQStPSkxuSmlyOU9aeUdRaEJ2UTRRSm8KLS0tIFd3SG9YdEU5T2tzNk16b2s1SUNj\nWkh2cng5eWd3ZmxVZDhSR2Y1QnFySDgKGb/t+8NqiSGgmFOJc1NmDYZ+PXlANy8V\nuFwUTeqWAv7pOiGC8oessfyTPaJ7gWjz+XfKV5JVVikK2l3J4eAGxg==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWM0daWmxCTjAyQStwQ2lM\nNkcyZW9hRmpDelRJR0VVTWhNTGFuZWhCc1RJCm81ZXowZjBhWGpIQTBhQnZLSmQy\nVUNNYjI0bVpqQ21YZS95TW53OUx1YUkKLS0tIDRUUE1zczBDeFJTOTQyVXVkMkYy\ncVVTN3J6TWtwcXVpM0M5c0gxUXpmV2cKwlWrbGLtkO2+PXKoMoHTV5aJpnfVy3RP\n6i8DDpLPGYfVUtWxHx+L+NmMxmw1AvmKSbdB4Y7aSbBW2mea3j1YCg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-07T11:45:50Z",
"mac": "ENC[AES256_GCM,data:rwdbGOg8l8fWT2GYFx+PgV3oPxt5+NCHJf3PhG3V2lrRMPRisyf1nKwDsYavTuhv+bZC/qo4LrGylcXsHWdkCe/xBX+/jYLMf6nJZPk8BPzfUpiDnEKwRl05qfRfkIDusnQrlBrE+tqtcool65js7hYIzSi92O/hxbzzfsCUpqk=,iv:lUTNJkr6Zh3MQm/h7Ven4N6xVn4VeTXOEKzxd0HSsCk=,tag:Bwbi4HD9vzso6306y7EZOg==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:sPh+BuT2we+d/GaMv4zPWc3rPhlMsJQC,iv:VwcHUOMaNiao+R8RBtUINffEUhutktKD6KEWLkFxyp4=,tag:SNVKLjjDv+u5XTVczs2/Uw==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJVWNYRGEwVWxDSmE4bTNL\nRlZPeGZabFZZNGFsMEwzV1ZmT1pqNVk4STMwCkg5UER0Vjk3K1RMazVVYjF3SDc2\ndDZHa3VtYjRiWUJET25weXprc0JNUjAKLS0tIDdVb2xNdWxCcjhpSGtGWDV0d2ti\nZENkZGNpSTNzMVVTZVN0ZktLc2VackEKdexhI37pwcnbZbcy30k9Uo5Z7z3NLqlx\nspxJ87SzEwdStTMhiH1iYf62vcyAOTa4HwfXu97MGVPFNw13/VfgCw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-07T11:45:50Z",
"mac": "ENC[AES256_GCM,data:tZRh8qj7JUnhXCfqCHJKWEFQ8XLtmo/p0C+eFIK+34enxfB5lG5Lq83wBXLa0D/nqrr58z1rLO+UVDOI5LH1jFxARBZZnUKrVJNTDHa5pUnlnVOFEOoc+R0h2E5Xw9OHaq7aDUh4fT9+gNDpguKggI5fS9KqRnmZ4VrpNccjnkw=,iv:2yI25fcWMog91EMD7bYQy3GS30a7gZHnif93MaE3sZo=,tag:tYqa6zssiU3BCFU5xmDYZQ==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1,41 @@
{ self, pkgs, ... }:
{
name = "app-ocr-smoke-test";
enableOCR = true;
nodes = {
wayland =
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/../tests/common/wayland-cage.nix") ];
services.cage.program = "${self.packages.${pkgs.system}.clan-app}/bin/clan-app";
virtualisation.memorySize = 2047;
# TODO: get rid of this and fix debus-proxy error instead
services.cage.environment.WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS = "1";
};
xorg =
{ pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/user-account.nix")
(modulesPath + "/../tests/common/x11.nix")
];
virtualisation.memorySize = 2047;
services.xserver.enable = true;
services.xserver.displayManager.sessionCommands = "${
self.packages.${pkgs.system}.clan-app
}/bin/clan-app";
test-support.displayManager.auto.user = "alice";
};
};
testScript = ''
start_all()
wayland.wait_for_unit('graphical.target')
xorg.wait_for_unit('graphical.target')
wayland.wait_for_text('Welcome to Clan')
xorg.wait_for_text('Welcome to Clan')
'';
}

View File

@@ -36,7 +36,7 @@
# Borgbackup overrides
services.borgbackup.repos.test-backups = {
path = "/var/lib/borgbackup/test-backups";
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
authorizedKeys = [ (builtins.readFile ../assets/ssh/pubkey) ];
};
clan.borgbackup.destinations.test-backup.repo = lib.mkForce "borg@machine:.";
@@ -45,7 +45,7 @@
programs.ssh.knownHosts = {
machine.hostNames = [ "machine" ];
machine.publicKey = builtins.readFile ../lib/ssh/pubkey;
machine.publicKey = builtins.readFile ../assets/ssh/pubkey;
};
services.openssh = {
@@ -60,7 +60,7 @@
];
};
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
users.users.root.openssh.authorizedKeys.keyFiles = [ ../assets/ssh/pubkey ];
# This is needed to unlock the user for sshd
# Because we use sshd without setuid binaries
@@ -68,21 +68,21 @@
systemd.tmpfiles.settings."vmsecrets" = {
"/root/.ssh/id_ed25519" = {
C.argument = "${../lib/ssh/privkey}";
C.argument = "${../assets/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/ssh.id_ed25519" = {
C.argument = "${../lib/ssh/privkey}";
C.argument = "${../assets/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
C.argument = "${../assets/ssh/privkey}";
z = {
mode = "0400";
user = "root";
@@ -147,34 +147,12 @@
perSystem =
{ pkgs, ... }:
let
clanCore = self.filter {
include = [
"checks/backups"
"checks/flake-module.nix"
"clanModules/borgbackup"
"clanModules/flake-module.nix"
"clanModules/localbackup"
"clanModules/packages"
"clanModules/single-disk"
"clanModules/zerotier"
"flake.lock"
"flakeModules"
"inventory.json"
"lib/build-clan"
"lib/default.nix"
"lib/select.nix"
"lib/flake-module.nix"
"lib/frontmatter"
"lib/inventory"
"lib/constraints"
"nixosModules"
];
};
clanCore = self.checks.x86_64-linux.clan-core-for-checks;
in
{
checks = pkgs.lib.mkIf pkgs.stdenv.isLinux {
test-backups = (import ../lib/container-test.nix) {
name = "test-backups";
backups = self.clanLib.test.containerTest {
name = "backups";
nodes.machine = {
imports =
[
@@ -186,11 +164,6 @@
# import the inventory generated nixosModules
self.clanInternals.inventoryClass.machines.test-backup.machineImports;
clan.core.settings.directory = ./.;
environment.systemPackages = [
(pkgs.writeShellScriptBin "foo" ''
echo ${clanCore}
'')
];
};
testScript = ''

View File

@@ -1,4 +1,4 @@
(import ../lib/test-base.nix) (
(
{ ... }:
{
name = "borgbackup";
@@ -12,17 +12,16 @@
{
services.openssh.enable = true;
services.borgbackup.repos.testrepo = {
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
authorizedKeys = [ (builtins.readFile ../assets/ssh/pubkey) ];
};
}
{
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
clan.core.state.testState.folders = [ "/etc/state" ];
environment.etc.state.text = "hello world";
systemd.tmpfiles.settings."vmsecrets" = {
"/etc/secrets/borgbackup/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
C.argument = "${../assets/ssh/privkey}";
z = {
mode = "0400";
user = "root";

View File

@@ -0,0 +1,6 @@
{ fetchgit }:
fetchgit {
url = "https://git.clan.lol/clan/clan-core.git";
rev = "1e8b9def2a021877342491ca1f4c45533a580759";
sha256 = "0f12vwr1abwa1iwjbb5z5xx8jlh80d9njwdm6iaw1z1h2m76xgzc";
}

View File

@@ -1,19 +1,44 @@
(import ../lib/container-test.nix) (
(
{ ... }:
{
name = "container";
nodes.machine =
nodes.machine1 =
{ ... }:
{
networking.hostName = "machine";
networking.hostName = "machine1";
services.openssh.enable = true;
services.openssh.startWhenNeeded = false;
};
nodes.machine2 =
{ ... }:
{
networking.hostName = "machine2";
services.openssh.enable = true;
services.openssh.startWhenNeeded = false;
};
testScript = ''
import subprocess
start_all()
machine.succeed("systemctl status sshd")
machine.wait_for_unit("sshd")
machine1.succeed("systemctl status sshd")
machine2.succeed("systemctl status sshd")
machine1.wait_for_unit("sshd")
machine2.wait_for_unit("sshd")
p1 = subprocess.run(["ip", "a"], check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
assert p1.returncode == 0
bridge_output = p1.stdout.decode("utf-8")
assert "br0" in bridge_output, f"bridge not found in ip a output: {bridge_output}"
for m in [machine1, machine2]:
out = machine1.succeed("ip addr show eth1")
assert "UP" in out, f"UP not found in ip addr show output: {out}"
assert "inet" in out, f"inet not found in ip addr show output: {out}"
assert "inet6" in out, f"inet6 not found in ip addr show output: {out}"
machine1.succeed("ping -c 1 machine2")
'';
}
)

View File

@@ -0,0 +1,86 @@
{
pkgs,
self,
clanLib,
...
}:
clanLib.test.makeTestClan {
inherit pkgs self;
nixosTest = (
{ lib, ... }:
let
machines = [
"admin"
"peer"
"signer"
];
in
{
name = "data-mesher";
clan = {
directory = ./.;
inventory = {
machines = lib.genAttrs machines (_: { });
services = {
data-mesher.default = {
roles.peer.machines = [ "peer" ];
roles.admin.machines = [ "admin" ];
roles.signer.machines = [ "signer" ];
};
};
};
};
defaults =
{ config, ... }:
{
environment.systemPackages = [
config.services.data-mesher.package
];
clan.data-mesher.network.interface = "eth1";
clan.data-mesher.bootstrapNodes = [
"[2001:db8:1::1]:7946" # peer1
"[2001:db8:1::2]:7946" # peer2
];
# speed up for testing
services.data-mesher.settings = {
cluster.join_interval = lib.mkForce "2s";
cluster.push_pull_interval = lib.mkForce "5s";
};
};
nodes = {
admin.clan.data-mesher.network.tld = "foo";
};
# TODO Add better test script.
testScript = ''
def resolve(node, success = {}, fail = [], timeout = 60):
for hostname, ips in success.items():
for ip in ips:
node.wait_until_succeeds(f"getent ahosts {hostname} | grep {ip}", timeout)
for hostname in fail:
node.wait_until_fails(f"getent ahosts {hostname}")
start_all()
admin.wait_for_unit("data-mesher")
signer.wait_for_unit("data-mesher")
peer.wait_for_unit("data-mesher")
# check dns resolution
for node in [admin, signer, peer]:
resolve(node, {
"admin.foo": ["2001:db8:1::1", "192.168.1.1"],
"peer.foo": ["2001:db8:1::2", "192.168.1.2"],
"signer.foo": ["2001:db8:1::3", "192.168.1.3"]
})
'';
}
);
}

View File

@@ -0,0 +1,4 @@
{
"publickey": "age10zxkj45fah3qa8uyg3a36jsd06d839xfq64nrez9etrsf4km0gtsp45gsz",
"type": "age"
}

View File

@@ -0,0 +1,4 @@
{
"publickey": "age1faqrml2ukc6unfm75d3v2vnaf62v92rdxaagg3ty3cfna7vt99gqlzs43l",
"type": "age"
}

View File

@@ -0,0 +1,4 @@
{
"publickey": "age153mke8v2qksyqjc7vta7wglzdqr5epazt83nch0ur5v7kl87cfdsr07qld",
"type": "age"
}

View File

@@ -0,0 +1,20 @@
{
"data": "ENC[AES256_GCM,data:7xyb6WoaN7uRWEO8QRkBw7iytP5hFrA94VRi+sy/UhzqT9AyDPmxB/F8ASFsBbzJUwi0Oqd2E1CeIYRoDhG7JHnDyL2bYonz2RQ=,iv:slh3x774m6oTHAXFwcen1qF+jEchOKCyNsJMbNhqXHE=,tag:wtK8H8PZCESPA1vZCd7Ptw==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPTzZ4RTVNb2I1MTBRMEcy\neU1Eek9GakkydEJBVm9kR3AyY1pEYkorNUYwCkh2WHhNQmc1eWI2cCtEUFFWdzJq\nS0FvQWtoOFkzRVBxVzhuczc0aVprbkkKLS0tIFRLdmpnbzY1Uk9LdklEWnQzZHM2\nVEx3dzhMSnMwaWE0V0J6VTZ5ZVFYMjgKdaICa/hprHxhH89XD7ri0vyTT4rM+Si0\niHcQU4x64dgoJa4gKxgr4k9XncjoNEjJhxL7i/ZNZ5deaaLRn5rKMg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:24:55Z",
"mac": "ENC[AES256_GCM,data:TJWDHGSRBfOCW8Q+t3YxG3vlpf9a5u7B27AamnOk95huqIv0htqWV3RuV7NoOZ5v2ijqSe/pLfpwrmtdhO2sUBEvhdhJm8UzLShP7AbH9lxV+icJOsY7VSrp+R5W526V46ONP6p47b7fOQBbp03BMz01G191N68WYOf6k2arGxU=,iv:nEyTBwJ2EA+OAl8Ulo5cvFX6Ow2FwzTWooF/rdkPiXg=,tag:oYcG16zR+Fb5XzVsHhq2Qw==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,20 @@
{
"data": "ENC[AES256_GCM,data:JOOhvl0clDD/b5YO45CXR3wVopBSNe9dYBG+p5iD+nniN2OgOwBgYPNSCVtc+NemqutD12hFUSfCzXidkv0ijhD1JZeLar9Ygxc=,iv:XctQwSYSvKhDRk/XMacC9uMydZ8e9hnhpoWTgyXiFI0=,tag:foAhBlg4DwpQU2G9DzTo5g==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBVWMvWkp5TnZQcGs5Ykhp\nWC91YkoyZERqdXpxQm5JVmRhaUhueEJETDJVCkM4V0hSYldkV1U2Q0d1TGh3eGNR\nVjJ1VFd6ZEN0SXZjSVEvcnV2WW0vbVUKLS0tIFRCNW9nWHdYaUxLSVVUSXM0OGtN\nVFMzRXExNkYxcFE3QWlxVUM3ay9INm8KV6r8ftpwarly3qXoU9y8KxKrUKLvP9KX\nGsP0pORsaM+qPMsdfEo35CqhAeQu0+6DWd7/67+fUMp6Jr0DthtTmg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:25:28Z",
"mac": "ENC[AES256_GCM,data:scY9+/fcXhfHEdrsZJLOM6nfjpRaURgTVbCRepUjhUo24B4ByEsAo2B8psVAaGEHEsFRZuoiByqrGzKhyUASmUs+wn+ziOKBTLzu55fOakp8PWYtQ4miiz2TQffp80gCQRJpykcbUgqIKXNSNutt4tosTBL7osXwCEnEQWd+SaA=,iv:1VXNvLP6DUxZYEr1juOLJmZCGbLp33DlwhxHQV9AMD4=,tag:uFM1R8OmkFS74/zkUG0k8A==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,20 @@
{
"data": "ENC[AES256_GCM,data:i1YBJdK8XmWnVnZKBpmWggSN8JSOr8pm2Zx+CeE8qqeLZ7xwMO8SYCutM8l94M5vzmmX0CmwzeMZ/JVPbEwFd3ZAImUfh685HOY=,iv:N4rHNaX+WmoPb0EZPqMt+CT1BzaWO9LyoemBxKn+u/s=,tag:PnzSvdGwVnTMK8Do8VzFaQ==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4RXlmcVNGTnlkY2ZqZFlH\nVnh0eHhRNE5hRDNDVkt0TEE0bmRNN2JIVkN3CkxnaGM4Y3M3a0xoK2xMRzBLMHRV\nT1FzKzNRMFZOeWc2K3E5K2FzdUsvWmsKLS0tIENtVlFSWElHN3RtOUY2alhxajhs\naXI1MmR4WC9EVGVFK3dHM1gvVnlZMVUKCyLz0DkdbWfSfccShO1xjWfxhunEIbD0\n6imeIBhZHvVJmZLXnVl7B0pNXo6be7WSBMAUM9gUtCNh4zaChBNwGw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:25:52Z",
"mac": "ENC[AES256_GCM,data:WFGysoXN95e/RxL094CoL4iueqEcSqCSQZLahwz9HMLi+8HWZIXr55a+jyK7piqR8nBS4BquU5fKhlC6BvEbZFt69t4onTA+LxS3D7A8/TO0CWS0RymUjW9omJUseRQWwAHtE7l0qI5hdOUKhQ+o5pU+2bc3PUlaONM0aOCCoFo=,iv:l1f4aVqLl5VAMfjNxDbxQEQp/qY/nxzgv2GTuPVBoBA=,tag:4PPDCmDrviqdn42RLHQYbA==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,4 @@
{
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"type": "age"
}

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/admin

View File

@@ -0,0 +1,24 @@
{
"data": "ENC[AES256_GCM,data:w3bU23Pfe8W89lF+tOmEYPU/A4FkY6n7rgQ6yo+eqCJFxTyHydV6Mg4/g4jaL+4wwIqNYRiMR8J8jLhSvw3Bc59u7Ul+RGwdpiKoBBJfsHjO8r6uOz2u9Raa+iUJH1EJWmGvsQXAILpliZ+klS96VWnGN3pYMEI=,iv:7QbUxta6NPQLZrh6AOcNe+0wkrADuTI9VKVp8q+XoZ8=,tag:ZH0t3RylfQk5U23ZHWaw0g==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age10zxkj45fah3qa8uyg3a36jsd06d839xfq64nrez9etrsf4km0gtsp45gsz",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKaTBoSFJVSTdZeW4wZG9p\nWFR1LzVmYS8xWmRqTlNtWFVkSW9jZXpVejJBCkpqZm12L1dDSmNhekVsK1JBOU9r\nZThScGdDakFlRzNsVXp1eE5yOStFSW8KLS0tIFRrTkZBQlRsR2VNcUJvNEkzS2pw\nNksvM296UkFWTkZDVVp1ZVZMNUs4cWsKWTteB1G9Oo38a81PeqKO09NUQetuqosC\nhrToQ6NMo5O7/StmVG228MHbJS3KLXsvh2AFOEPyZrbpB2Opd2wwoA==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB6U2FWRThRNkVQdk9yZ0VE\nM09iSVhmeldMcDZVaFRDNGtjWTdBa0VIT2pJCkdtd04xSXdicDY3OHI1WXl5TndB\nemtQeW1SS2tVVllPUHhLUTRla3haZGMKLS0tIGN0NVNEN3RKeWM0azBBMnBpQU4r\nTFFzQ0lOcGt0ek9UZmZZRjhibTNTc0EKReUwYBVM1NKX0FD/ZeokFAAknwju5Azq\nGzl4UVJBi5Es0GWORdCGElPXMd7jMud1SwgY04AdZj/dzinCSW4CZw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:25:10Z",
"mac": "ENC[AES256_GCM,data:0vl9Gt4QeH+GJcnl8FuWSaqQXC8S6Pe50NmeDg5Nl2NWagz8aLCvOFyTqX/Icp/bTi1XQ5icHHhF3YhM+QAvdUL3aO0WGbh92dPRnFuvlZsdtwCFhT+LyHyYHFf6yP+0h/uFpJv9fE6xY22CezA6ZVQ8ywi1epaC548Gr27uVe4=,iv:G4hZVCLkIpbg9uwB7Y8xtHLdnlmBvFrPjxSoqdyHNvM=,tag:uvKwakhUY2aa7v0tmR/o8A==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAm204bpSFi4jOjZuXDpIZ/rcJBrbG4zAc7OSA4rAVSYE=
-----END PUBLIC KEY-----

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/peer

View File

@@ -0,0 +1,24 @@
{
"data": "ENC[AES256_GCM,data:kERPY40pyvke0mRBnafa4zOaF46rbueRbhpUCXjYP5ORpC7zoOhbdlVBhOsPqE2vfEP4RWkH+ZPdDYXOKXwotBCmlq2i7TfZeoNXFkzWXc3GyM5mndnjCc8hvYEQF1w6xkkVSUt4n06BAw/gT0ppz+vo5dExIA8=,iv:JmYD2o4DGqds6DV7ucUmUD0BRB61exbRsNAtINOR8cQ=,tag:Z58gVnHD+4s21Z84IRw+Vw==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age1faqrml2ukc6unfm75d3v2vnaf62v92rdxaagg3ty3cfna7vt99gqlzs43l",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4OFluVThBdUJSTmRVTk94\neFZnLytvcnNSdmQvR3ZkT2UvWFVieFV1SUFNCm9jWHlyZXRwaVdFaG9ocnd4S3FU\ndTZ2dklBbkFVL0hVT0Y2L1o5dnUyNG8KLS0tIGFvYlBJR3l2b3F6OU9uMTFkYjli\nNVFLOWQzOStpU2kzb0xyZUFCMnBmMVUK5Jzssf1XBX25bq0RKlJY8NwtKIytxL/c\nBPPFDZywJiUgw1izsdfGVkRhhSFCQIz+yWIJWzr01NU2jLyFjSfCNw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzYW92c3Q4SktwSnJ1TkRJ\nZEJyZk96cG8ybkpPQzYzVk0xZGs0eCtISVR3CmhDaWxTem1FMjJKNmZNaTkxN01n\nenUvdFI1UkFmL1lzNlM5N0Ixd0dpc1EKLS0tIHpyS2VHaHRRdUovQVgvRmRHaXh3\naFpSNURjTWkxaW9TOXpKL2IvcUFEbmMKq4Ch7DIL34NetFV+xygTdcpQjjmV8v1n\nlvYcjUO/9c3nVkxNMJYGjuxFLuFc4Gw+AyawCjpsIYXRskYRW4UR1w==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:25:43Z",
"mac": "ENC[AES256_GCM,data:YhL2d6i0VpUd15B4ow2BgRpyEm0KEA8NSb7jZcjI58d7d4lAqBMcDQB+8a9e2NZbPk8p1EYl3q4VXbEnuwsJiPZI2kabRusy/IGoHzUTUMFfVaOuUcC0eyINNVSmzJxnCbLCAA1Aj1yXzgRQ0MWr7r0RHMKw0D1e0HxdEsuAPrA=,iv:yPlMmE6+NEEQ9uOZzD3lUTBcfUwGX/Ar+bCu0XKnjIg=,tag:eR22BCFVAlRHdggg9oCeaA==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAv5dICFue2fYO0Zi1IyfYjoNfR6713WpISo7+2bSjL18=
-----END PUBLIC KEY-----

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/signer

View File

@@ -0,0 +1,24 @@
{
"data": "ENC[AES256_GCM,data:U8F7clQ2Tuj8zy5EoEga/Mc9N3LLZrlFf5m7UJKrP5yybFRCJSBs05hOcNe+LQZdEAvvr0Qbkry1pQyE84gCVbxHvwkD+l3GbguBuLMsW96bHcmstb6AvZyhMDBpm73Azf4lXhNaiB8p2pDWdxV77E+PPw1MNYI=,iv:hQhN6Ak8tB6cXSCnTmmQqHEpXWpWck3uIVCk5pUqFqU=,tag:uC4ljcs92WPlUOfwSkrK9Q==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age153mke8v2qksyqjc7vta7wglzdqr5epazt83nch0ur5v7kl87cfdsr07qld",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvV05lejQrdUQvQjZPOG9v\nZ01naXlYZ1JxWHhDT1M1aUs1RWJDSU1acVFFCmdHY094aGRPYWxpdVVxSFVHRU9v\nNnVaeTlpSEdtSWRDMmVMSjdSOEQ4ZlEKLS0tIFo5NVk2bzBxYjZ5ZWpDWTMrQ2VF\nVThWUk0rVXpTY2svSCtiVDhTQ2kvbFkKEM2DBuFtdEj1G/vS1TsyIfQxSFFvPTDq\nCmO7L/J5lHdyfIXzp/FlhdKpjvmchb8gbfJn7IWpKopc7Zimy/JnGQ==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArNzVUaHkzUzVEMlh1Q3Qr\nOEo0aDJIMG91amJiZG50MEhqblRCTWxRRVVRCk4xZlp4SkJuUHc2UnFyU1prczkz\nNGtlQlRlNnBDRFFvUGhReTh6MTBZaXMKLS0tIGxtaXhUMDM0RU4yQytualdzdTFt\nWGRiVG54MnYrR2lqZVZoT0VkbmV5WUUKbzAnOkn8RYOo7z4RISQ0yN875vSEQMDa\nnnttzVrQuK0/iZvzJ0Zq8U9+JJJKvFB1tHqye6CN0zMbv55CLLnA0g==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:26:07Z",
"mac": "ENC[AES256_GCM,data:uMss4+BiVupFqX7nHnMo+0yZ8RPuFD8VHYK2EtJSqzgurQrZVT4tJwY50mz2gVmwbrm49QYKk5S+H29DU0cM0HiEOgB5P5ObpXTRJPagWQ48CEFrDpBzLplobxulwnN6jJ1dpL3JF3jfrzrnSDFXMvx+n5x/86/AYXYRsi/UeyY=,iv:mPT1svKrNGmYpbL9hh2Bxxakml69q+U6gQ0ZnEcbEyg=,tag:zcZx1lTw/bEsX/1g+6T04g==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAeUkW5UIwA1svbNY71ePyJKX68UhxrqIUGQ2jd06w5WM=
-----END PUBLIC KEY-----

View File

@@ -0,0 +1 @@
../../../../../sops/machines/admin

View File

@@ -0,0 +1 @@
../../../../../sops/machines/peer

View File

@@ -0,0 +1 @@
../../../../../sops/machines/signer

View File

@@ -0,0 +1,32 @@
{
"data": "ENC[AES256_GCM,data:nRlCMF58cnkdUAE2aVHEG1+vAckKtVt48Jr21Bklfbsqe1yTiHPFAMLL1ywgWWWd7FjI/Z8WID9sWzh9J8Vmotw4aJWU/rIQSeF8cJHALvfOxarJIIyb7purAiPoPPs6ggGmSmVFGB1aw8kH1JMcppQN8OItdQM=,iv:qTwaL2mgw6g7heN/H5qcjei3oY+h46PdSe3v2hDlkTs=,tag:jYNULrOPl9mcQTTrx1SDeA==,type:str]",
"sops": {
"kms": null,
"gcp_kms": null,
"azure_kv": null,
"hc_vault": null,
"age": [
{
"recipient": "age153mke8v2qksyqjc7vta7wglzdqr5epazt83nch0ur5v7kl87cfdsr07qld",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRcG44cGFBWXk2Z0pmNklv\nTnJ5b0svLytzZmNNRkxCVU1zaDVhNUs2cld3CklsenpWd0g2OEdKKzBMQlNEejRn\nTlEvY01HYjdvVExadnN3aXZIRTZ4YlEKLS0tIGRPUXdNSHZCRDBMbno2MjJqRHBl\nSzdiSURDYitQWFpaSElkdmdicDVjMWsKweQiRqyzXmzabmU2fmgwHtOa9uDmhx9O\ns9NfUhC3ifooQUSeYp58b1ZGJQx5O5bn9q/DaEoit5LTOUprt1pUPA==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiTEdlL29sVWFpSDNNaXRJ\ndTJDRkU4VzFPQ0M4MkFha2IxV2FXN2o3ZEFRCjF3UnZ5U1hTc3VvSTIzcWxOZjl0\ncHlLVEFqRk1UbGdxaUxEeDFqbFVYaU0KLS0tIFFyMnJkZnRHdWg4Z1IyRHFkY0I5\nQjdIMGtGLzRGMFM0ektDZ3hzZDdHSmMKvxOQuKgePom0QfPSvn+4vsGHhJ4BoOvW\nc27Vn4/i4hbjfJr4JpULAwyIwt3F0RaTA2M6EkFkY8otEi3vkcpWvA==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age10zxkj45fah3qa8uyg3a36jsd06d839xfq64nrez9etrsf4km0gtsp45gsz",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA5ZzdsaVRnSmsrMGR1Ylg3\nZkpscTdwNUl5NUVXN3kvMU1icE0yZU1WSEJBClB6SlJYZUhDSElRREx5b0VueFUw\nNVFRU3BSU24yWEtpRnJoUC83SDVaUWsKLS0tIGVxNEo3TjlwakpDZlNsSkVCOXlz\nNDgwaE1xNjZkSnJBVlU5YXVHeGxVNFEKsXKyTzq9VsERpXzbFJGv/pbAghFAcXkf\nMmCgQHsfIMBJQUstcO8sAkxv3ced0dAEz8O6NUd0FS2zlhBzt29Rnw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1faqrml2ukc6unfm75d3v2vnaf62v92rdxaagg3ty3cfna7vt99gqlzs43l",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkK1hDMGxCc1IvYXlJMnBF\nWncxaXBQa1RpTWdwUHc3Yk16My8rVHNJc2dFCkNlK2h0dy9oU3Z5ZGhwRWVLYVUz\ncVBKT2x5VnlhbXNmdHkwbmZzVG5sd0EKLS0tIHJaMzhDanF4Rkl3akN4MEIxOHFC\nYWRUZ08xb1UwOFNRaktkMjIzNXZmNkUK1rlbJ96oUNQZLmCmPNDOKxfDMMa+Bl2E\nJPxcNc7XY3WBHa3xFUbcqiPxWxDyaZjhq/LYQGpepiGonGMEzR5JOQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-08T13:25:20Z",
"mac": "ENC[AES256_GCM,data:za9ku+9lu1TTRjbPcd5LYDM4tJsAYF/yuWFCGkAhqcYguEducsIfoKBwL42ahAzqLjCZp91YJuINtw16mM+Hmlhi/BVwhnXNHqcfnKoAS/zg9KJvWcvXwKMmjEjaBovqaCWXWoKS7dn/wZ7nfGrlsiUilCDkW4BzTIzkqNkyREU=,iv:2X9apXMatwCPRBIRbPxz6PJQwGrlr7O+z+MrsnFq+sQ=,tag:IYvitoV4MhyJyRO1ySxbLQ==,type:str]",
"pgp": null,
"unencrypted_suffix": "_unencrypted",
"version": "3.9.4"
}
}

View File

@@ -0,0 +1 @@
../../../../../sops/users/admin

View File

@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA/5j+Js7oxwWvZdfjfEO/3UuRqMxLKXsaNc3/5N2WSaw=
-----END PUBLIC KEY-----

View File

@@ -10,7 +10,6 @@
self.clanModules.deltachat
self.nixosModules.clanCore
{
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
}
];

View File

@@ -0,0 +1,122 @@
{
...
}:
{
perSystem =
{
system,
pkgs,
self',
lib,
...
}:
let
clanCore = self'.packages.clan-core-flake;
clanCoreHash = lib.substring 0 12 (builtins.hashString "sha256" "${clanCore}");
/*
construct a flake for the test which contains a single check which depends
on all checks of clan-core.
*/
testFlakeFile = pkgs.writeText "flake.nix" ''
{
inputs.clan-core.url = path:///to/nowhere;
outputs = {clan-core, ...}:
let
checks =
builtins.removeAttrs
clan-core.checks.${system}
[
"dont-depend-on-repo-root"
"package-dont-depend-on-repo-root"
"package-clan-core-flake"
];
checksOutPaths = map (x: "''${x}") (builtins.attrValues checks);
in
{
checks.${system}.check = builtins.derivation {
name = "all-clan-core-checks";
system = "${system}";
builder = "/bin/sh";
args = ["-c" '''
of outPath in ''${toString checksOutPaths}; do
echo "$outPath" >> $out
done
'''];
};
};
}
'';
in
lib.optionalAttrs (system == "x86_64-linux") {
packages.dont-depend-on-repo-root =
pkgs.runCommand
# append repo hash to this tests name to ensure it gets invalidated on each chain
# This is needed because this test is an FOD (due to networking) and would get cached indefinitely.
"check-dont-depend-on-repo-root-${clanCoreHash}"
{
buildInputs = [
pkgs.nix
pkgs.cacert
pkgs.nix-diff
];
outputHashAlgo = "sha256";
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=";
}
''
mkdir clanCore testFlake store
clanCore=$(realpath clanCore)
testFlake=$(realpath testFlake)
# copy clan core flake and make writable
cp -r ${clanCore}/* clanCore/
chmod +w -R clanCore\
# copy test flake and make writable
cp ${testFlakeFile} testFlake/flake.nix
chmod +w -R testFlake
# enable flakes
export NIX_CONFIG="experimental-features = nix-command flakes"
# give nix a $HOME
export HOME=$(realpath ./store)
# override clan-core flake input to point to $clanCore\
echo "locking clan-core to $clanCore"
nix flake lock --override-input clan-core "path://$clanCore" "$testFlake" --store "$HOME"
# evaluate all tests
echo "evaluating all tests for clan core"
nix eval "$testFlake"#checks.${system}.check.drvPath --store "$HOME" --raw > drvPath1 &
# slightly modify clan core
cp -r $clanCore clanCore2
cp -r $testFlake testFlake2
export clanCore2=$(realpath clanCore2)
export testFlake2=$(realpath testFlake2)
touch clanCore2/fly-fpv
# re-evaluate all tests
echo "locking clan-core to $clanCore2"
nix flake lock --override-input clan-core "path://$clanCore2" "$testFlake2" --store "$HOME"
echo "evaluating all tests for clan core with added file"
nix eval "$testFlake2"#checks.${system}.check.drvPath --store "$HOME" --raw > drvPath2
# wait for first nix eval to return as well
while ! grep -q drv drvPath1; do sleep 1; done
# raise error if outputs are different
if [ "$(cat drvPath1)" != "$(cat drvPath2)" ]; then
echo -e "\n\nERROR: Something in clan-core depends on the whole repo" > /dev/stderr
echo -e "See details in the nix-diff below which shows the difference between two evaluations:"
echo -e " 1. Evaluation of clan-core checks without any changes"
echo -e " 1. Evaluation of clan-core checks after adding a file to the top-level of the repo"
echo "nix-diff:"
export NIX_REMOTE="$HOME"
nix-diff $(cat drvPath1) $(cat drvPath2)
exit 1
fi
touch $out
'';
};
}

View File

@@ -0,0 +1,93 @@
{
pkgs,
self,
clanLib,
...
}:
clanLib.test.makeTestClan {
inherit pkgs self;
nixosTest = (
{ ... }:
{
# This tests the compatibility of the inventory
# With the test framework
# - legacy-modules
# - clan.service modules
name = "dummy-inventory-test";
clan = {
directory = ./.;
inventory = {
machines.peer1 = { };
machines.admin1 = { };
services = {
legacy-module.default = {
roles.peer.machines = [ "peer1" ];
roles.admin.machines = [ "admin1" ];
};
};
instances."test" = {
module.name = "new-service";
roles.peer.machines.peer1 = { };
};
modules = {
legacy-module = ./legacy-module;
};
};
modules.new-service = {
_class = "clan.service";
manifest.name = "new-service";
roles.peer = { };
perMachine = {
nixosModule = {
# This should be generated by:
# nix run .#generate-test-vars -- checks/dummy-inventory-test dummy-inventory-test
clan.core.vars.generators.new-service = {
files.not-a-secret = {
secret = false;
deploy = true;
};
files.a-secret = {
secret = true;
deploy = true;
owner = "nobody";
group = "users";
mode = "0644";
};
script = ''
# This is a dummy script that does nothing
echo -n "not-a-secret" > $out/not-a-secret
echo -n "a-secret" > $out/a-secret
'';
};
};
};
};
};
testScript =
{ nodes, ... }:
''
start_all()
admin1.wait_for_unit("multi-user.target")
peer1.wait_for_unit("multi-user.target")
# Provided by the legacy module
print(admin1.succeed("systemctl status dummy-service"))
print(peer1.succeed("systemctl status dummy-service"))
# peer1 should have the 'hello' file
peer1.succeed("cat ${nodes.peer1.clan.core.vars.generators.new-service.files.not-a-secret.path}")
ls_out = peer1.succeed("ls -la ${nodes.peer1.clan.core.vars.generators.new-service.files.a-secret.path}")
# Check that the file is owned by 'nobody'
assert "nobody" in ls_out, f"File is not owned by 'nobody': {ls_out}"
# Check that the file is in the 'users' group
assert "users" in ls_out, f"File is not in the 'users' group: {ls_out}"
# Check that the file is in the '0644' mode
assert "-rw-r--r--" in ls_out, f"File is not in the '0644' mode: {ls_out}"
'';
}
);
}

View File

@@ -0,0 +1,10 @@
---
description = "Set up dummy-module"
categories = ["System"]
features = [ "inventory" ]
[constraints]
roles.admin.min = 1
roles.admin.max = 1
---

View File

@@ -0,0 +1,5 @@
{
imports = [
../shared.nix
];
}

View File

@@ -0,0 +1,5 @@
{
imports = [
../shared.nix
];
}

View File

@@ -0,0 +1,34 @@
{ config, ... }:
{
systemd.services.dummy-service = {
enable = true;
description = "Dummy service";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
generated_password_path="${config.clan.core.vars.generators.dummy-generator.files.generated-password.path}"
if [ ! -f "$generated_password_path" ]; then
echo "Generated password file not found: $generated_password_path"
exit 1
fi
host_id_path="${config.clan.core.vars.generators.dummy-generator.files.host-id.path}"
if [ ! -e "$host_id_path" ]; then
echo "Host ID file not found: $host_id_path"
exit 1
fi
'';
};
# TODO: add and prompt and make it work in the test framework
clan.core.vars.generators.dummy-generator = {
files.host-id.secret = false;
files.generated-password.secret = true;
script = ''
echo $RANDOM > "$out"/host-id
echo $RANDOM > "$out"/generated-password
'';
};
}

View File

@@ -0,0 +1,6 @@
[
{
"publickey": "age12yt078p9ewxy2sh0a36nxdpgglv8wqqftmj4dkj9rgy5fuyn4p0q5nje9m",
"type": "age"
}
]

View File

@@ -0,0 +1,6 @@
[
{
"publickey": "age12w2ld4vxfyf3hdq2d8la4cu0tye4pq97egvv3me4wary7xkdnq2snh0zx2",
"type": "age"
}
]

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:GPpsUhSzWPtTP8EUNKsobFXjYqDldhkkIH6hBk11RsDLAGWdhVrwcISGbhsWpYhvAdPKA84DB6Zqyh9lL2bLM9//ybC1kzY20BQ=,iv:NrxMLdedT2FCkUAD00SwsAHchIsxWvqe7BQekWuJcxw=,tag:pMDXcMyHnLF2t3Qhb1KolA==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzb2tWb1ExKzdmUTRzaGVj\nK3cyYTBHZTJwVjM1SzUvbHFiMnVhY05iKzFZCnJTSE1VSVdpcUFLSEJuaE1CZzJD\nWjZxYzN2cUltdThNMVRKU3FIb20vUXMKLS0tIFlHQXRIdnMybDZFUVEzWlQrc1dw\nbUxhZURXblhHd0pka0JIK1FTZEVqdUEKI/rfxQRBc+xGRelhswkJQ9GcZs6lzfgy\nuCxS5JI9npdPLQ/131F3b21+sP5YWqks41uZG+vslM1zQ+BlENNhDw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-04T12:44:13Z",
"mac": "ENC[AES256_GCM,data:fWxLHXBWolHVxv6Q7utcy6OVLV13ziswrIYyNKiwy1vsU8i7xvvuGO1HlnE+q43D2WuHR53liKq1UHuf1JMrWzTwZ0PYe+CVugtoEtbR2qu3rK/jAkOyMyhmmHzmf6Rp4ZMCzKgZeC/X2bDKY/z0firHAvjWydEyogutHpvtznM=,iv:OQI3FfkLneqbdztAXVQB3UkHwDPK+0hWu5hZ9m8Oczg=,tag:em6GfS2QHsXs391QKPxfmA==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:W3cOkUYL5/YulW2pEISyTlMaA/t7/WBE7BoCdFlqrqgaCL7tG4IV2HgjiPWzIVMs0zvDSaghdEvAIoB4wOf470d1nSWs0/E8SDk=,iv:wXXaZIw3sPY8L/wxsu7+C5v+d3RQRuwxZRP4YLkS8K4=,tag:HeK4okj7O7XDA9JDz2KULw==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxRC83b3dtSVpXcGovNnVs\nTzFka2J2MEFhYkF1ajVrdjMrNUtPWGRObjM4Cm5zSUR5OGw0T0FaL3BaWmR6L29W\nU2syMFIyMUhFRUZpWFpCT28vWko2ZU0KLS0tIFpHK3BjU1V1L0FrMGtwTGFuU3Mz\nRkV5VjI2Vndod202bUR3RWQwNXpmVzQKNk8/y7M62wTIIKqY4r3ZRk5aUCRUfine\n1LUSHMKa2bRe+hR7nS7AF4BGXp03h2UPY0FP5+U5q8XuIj1jfMX8kg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-04T12:44:16Z",
"mac": "ENC[AES256_GCM,data:yTkQeFvKrN1+5FP+yInsaRWSAG+ZGG0uWF3+gVRvzJTFxab8kT2XkAMc+4D7SKgcjsmwBBb77GNoAKaKByhZ92UaCfZ2X66i7ZmYUwLM1NVVmm+xiwwjsh7PJXlZO/70anTzd1evtlZse0jEmRnV5Y0F0M6YqXmuwU+qGUJU2F8=,iv:sy6ozhXonWVruaQfa7pdEoV5GkNZR/UbbINKAPbgWeg=,tag:VMruQ1KExmlMR7TsGNgMlg==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,4 @@
{
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"type": "age"
}

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/admin1

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:T8edCvw=,iv:7/G5xt5fv38I9uFzk7WMIr9xQdz/6lFxqOC+18HBg8Q=,tag:F39Cxbgmzml+lZLsZ59Kmg==,type:str]",
"sops": {
"age": [
{
"recipient": "age12yt078p9ewxy2sh0a36nxdpgglv8wqqftmj4dkj9rgy5fuyn4p0q5nje9m",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPNUhiYkZWK3dPMHNiRTVM\nRHNvaHFsOFp1c0UxQitwVG0zY01MNDZRV1E4CjEybENoTVIzN29vQ3FtUTRSYmFU\nNXIzQllVSllXRGN2M1B6WXJLdHZSajgKLS0tIDllZ0ZmZUcxMHhDQUpUOEdWbmkv\neUQweHArYTdFSmNteVpuQ3BKdnh0Y0UKs8Hm3D+rXRRfpUVSZM3zYjs6b9z8g10D\nGTkvreUMim4CS22pjdQ3eNA9TGeDXfWXE7XzwXLCb+wVcf7KwbDmvg==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKSDhpT3cvck9PenZYVEZH\ndFQreVRBdG93L1dBUGlvYjFWcDlHWUJsZUVBCm9DMTJ4UytiYzlEVHNWdUcwS1ds\nT0dhbzAzNDdmbDBCU0dvL2xNeHpXcGsKLS0tIFArbmpsbzU3WnpJdUt1MGN0L1d0\nV1JkTDJYWUxsbmhTQVNOeVRaSUhTODQKk9Vph2eldS5nwuvVX0SCsxEm4B+sO76Z\ndIjJ3OQxzoZmXMaOOuKHC5U0Y75Qn7eXC43w5KHsl2CMIUYsBGJOZw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-04T12:44:14Z",
"mac": "ENC[AES256_GCM,data:6fKrS1eLLUWlHkQpxLFXBRk6f2wa5ADLMViVvYXXGU24ayl9UuNSKrCRHp9cbzhqhti3HdwyNt6TM+2X6qhiiAQanKEB2PF7JRYX74NfNKil9BEDjt5AqqtpSgVv5l7Ku/uSHaPkd2sDmzHsy5Q4bSGxJQokStk1kidrwle+mbc=,iv:I/Aad82L/TCxStM8d8IZICUrwdjRbGx2fuGWqexr21o=,tag:BfgRbGUxhPZzK2fLik1kxA==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/peer1

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:vp0yW0Gt,iv:FO2cy+UpEl5aRay/LUGu//c82QiVxuKuGSaVh0rGJvc=,tag:vf2RAOPpcRW0HwxHoGy17A==,type:str]",
"sops": {
"age": [
{
"recipient": "age12w2ld4vxfyf3hdq2d8la4cu0tye4pq97egvv3me4wary7xkdnq2snh0zx2",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjaFVNMEd2YUxpSm5XVVRi\nY2ZUc3NTOStJUFNMWWVPQTgxZ2tCK1QrMW1ZCjYwMlA4dkIzSlc0TGtvZjcyK3Bi\nM3pob2JOOFUyeVJ6M2JpaTRCZlc1R0kKLS0tIDJMb1dFcVRWckhwYWNCQng0RlFO\nTkw3OGt4dkFIZVY5aVEzZE5mMzJSM0EKUv8bUqg48L2FfYVUVlpXvyZvPye699of\nG6PcjLh1ZMbNCfnsCzr+P8Vdk/F4J/ifxL66lRGfu2xOLxwciwQ+5Q==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnZ2dDbVhoQngxM3lTSmZF\nUTAwS1lCTGhEMU1GVXpFUzlIUFdqZy9LajF3Ck9mdVpBRjlyVUNhZXZIUFZjUzF1\nNlhFN28vNmwzcUVkNmlzUnpkWjJuZE0KLS0tIHpXVHVlNk9vU1ZPTGRrYStWbmRO\nbDM4U2o1SlEwYWtqOXBqd3BFUTAvMHcKkI8UVd0v+x+ELZ5CoGq9DzlA6DnVNU2r\nrV9wLfbFd7RHxS0/TYZh5tmU42nO3iMYA9FqERQXCtZgXS9KvfqHwQ==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-04T12:44:18Z",
"mac": "ENC[AES256_GCM,data:1ZZ+ZI1JsHmxTov1bRijfol3kTkyheg2o3ivLsMHRhCmScsUry97hQJchF78+y2Izt7avaQEHYn6pVbYt/0rLrSYD7Ru7ITVxXoYHOiN5Qb98masUzpibZjrdyg5nO+LW5/Hmmwsc3yn/+o3IH1AUYpsxlJRdnHHCmoSOFaiFFM=,iv:OQlgmpOTw4ljujNzqwQ5/0Mz8pQpCSUtqRvj3FJAxDs=,tag:foZvdeW7gK9ZVKkWqnlxGA==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1 @@
../../../../../../sops/machines/peer1

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:prFl0EJy8bM=,iv:zITWxf+6Ebk0iB5vhhd7SBQa1HFrIJXm8xpSM+D9I0M=,tag:NZCRMCs1SzNKLBu/KUDKMQ==,type:str]",
"sops": {
"age": [
{
"recipient": "age12w2ld4vxfyf3hdq2d8la4cu0tye4pq97egvv3me4wary7xkdnq2snh0zx2",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0S0RZRWxaZVZvTUhjdWVL\naU9WZmtEcm1qa2JsRmdvdmZmNENMaWFEVUFRCmdoVnRXSGlpRlFjNmVVbDJ5VnFT\nMnVJUlVnM3lxNmZCRTdoRVJ4NW1oYWcKLS0tIFFNbXBFUk1RWnlUTW1SeG1vYzlM\nVVpEclFVOE9PWWQxVkZ0eEgwWndoRWcKDAOHe+FIxqGsc6LhxMy164qjwG6t2Ei2\nP0FSs+bcKMDpudxeuxCjnDm/VoLxOWeuqkB+9K2vSm2W/c/fHTSbrA==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2VU5jOEpwYUtDVEVFcVpU\nQkExTVZ3ejZHcGo5TG8zdUQwNktoV09WdUZvCmQ0dE1TOWRFbTlxdVd4WWRxd3VF\nQUNTTkNNT3NKYjQ5dEJDY0xVZ3pZVUUKLS0tIDFjajRZNFJZUTdNeS8yN05FMFZU\ncEtjRjhRbGE0MnRLdk10NkFLMkxqencKGzJ66dHluIghH04RV/FccfEQP07yqnfb\n25Hi0XIVJfXBwje4UEyszrWTxPPwVXdQDQmoNKf76Qy2jYqJ56uksw==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-04T12:44:20Z",
"mac": "ENC[AES256_GCM,data:FIkilsni5kOdNlVwDuLsQ/zExypHRWdqIBQDNWMLTwe8OrsNPkX+KYutUvt9GaSoGv4iDULaMRoizO/OZUNfc2d8XYSdj0cxOG1Joov4GPUcC/UGyNuQneAejZBKolvlnidKZArofnuK9g+lOTANEUtEXUTnx8L+VahqPZayQas=,iv:NAo6sT3L8OOB3wv1pjr3RY2FwXgVmZ4N0F4BEX4YPUY=,tag:zHwmXygyvkdpASZCodQT9Q==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

@@ -0,0 +1 @@
../../../../../../sops/users/admin

View File

@@ -0,0 +1 @@
not-a-secret

View File

@@ -12,15 +12,16 @@ in
./flash/flake-module.nix
./impure/flake-module.nix
./installation/flake-module.nix
./installation-without-system/flake-module.nix
./morph/flake-module.nix
./nixos-documentation/flake-module.nix
./dont-depend-on-repo-root.nix
];
perSystem =
{
pkgs,
lib,
self',
system,
...
}:
{
@@ -28,36 +29,91 @@ in
let
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
inherit pkgs lib;
# this gives us a reference to our flake but also all flake inputs
inherit self;
inherit (self) clanLib;
};
nixosTests = lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
# Deltachat is currently marked as broken
# deltachat = import ./deltachat nixosTestArgs;
borgbackup = import ./borgbackup nixosTestArgs;
matrix-synapse = import ./matrix-synapse nixosTestArgs;
mumble = import ./mumble nixosTestArgs;
syncthing = import ./syncthing nixosTestArgs;
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
postgresql = import ./postgresql nixosTestArgs;
wayland-proxy-virtwl = import ./wayland-proxy-virtwl nixosTestArgs;
};
nixosTests =
lib.optionalAttrs (pkgs.stdenv.isLinux) {
# Deltachat is currently marked as broken
# deltachat = import ./deltachat nixosTestArgs;
# Base Tests
secrets = self.clanLib.test.baseTest ./secrets nixosTestArgs;
borgbackup = self.clanLib.test.baseTest ./borgbackup nixosTestArgs;
wayland-proxy-virtwl = self.clanLib.test.baseTest ./wayland-proxy-virtwl nixosTestArgs;
# Container Tests
container = self.clanLib.test.containerTest ./container nixosTestArgs;
zt-tcp-relay = self.clanLib.test.containerTest ./zt-tcp-relay nixosTestArgs;
matrix-synapse = self.clanLib.test.containerTest ./matrix-synapse nixosTestArgs;
postgresql = self.clanLib.test.containerTest ./postgresql nixosTestArgs;
# Clan Tests
dummy-inventory-test = import ./dummy-inventory-test nixosTestArgs;
admin = import ./admin nixosTestArgs;
data-mesher = import ./data-mesher nixosTestArgs;
syncthing = import ./syncthing nixosTestArgs;
}
// lib.optionalAttrs (pkgs.stdenv.hostPlatform.system == "aarch64-linux") {
# for some reason this hangs in an odd place in CI, but it works on my machine ...
# on aarch64-linux it works though
mumble = import ./mumble nixosTestArgs;
};
packagesToBuild = lib.removeAttrs self'.packages [
# exclude the check that checks that nothing depends on the repo root
# We might want to include this later once everything is fixed
"dont-depend-on-repo-root"
];
flakeOutputs =
lib.mapAttrs' (
name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
) (lib.filterAttrs (n: _: !lib.hasPrefix "test-" n) self.nixosConfigurations)
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") packagesToBuild
// 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 // flakeOutputs;
nixosTests
// flakeOutputs
// {
# TODO: Automatically provide this check to downstream users to check their modules
clan-modules-json-compatible =
let
allSchemas = lib.mapAttrs (
_n: m:
let
schema =
(self.clanLib.inventory.evalClanService {
modules = [ m ];
prefix = [
"checks"
system
];
}).config.result.api.schema;
in
schema
) self.clan.modules;
in
pkgs.runCommand "combined-result"
{
schemaFile = builtins.toFile "schemas.json" (builtins.toJSON allSchemas);
}
''
mkdir -p $out
cat $schemaFile > $out/allSchemas.json
'';
clan-core-for-checks = pkgs.runCommand "clan-core-for-checks" { } ''
cp -r ${pkgs.callPackage ./clan-core-for-checks.nix { }} $out
chmod +w $out/flake.lock
cp ${../flake.lock} $out/flake.lock
'';
};
legacyPackages = {
nixosTests =
let
@@ -72,6 +128,8 @@ in
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
# Clan app tests
app-ocr = self.clanLib.test.baseTest ./app-ocr nixosTestArgs;
};
};
};

View File

@@ -26,7 +26,7 @@
test-flash-machine =
{ lib, ... }:
{
imports = [ self.nixosModules.test-install-machine ];
imports = [ self.nixosModules.test-install-machine-without-system ];
clan.core.vars.generators.test = lib.mkForce { };
@@ -36,7 +36,6 @@
perSystem =
{
nodes,
pkgs,
lib,
...
@@ -44,6 +43,7 @@
let
dependencies = [
pkgs.disko
pkgs.buildPackages.xorg.lndir
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".pkgs.perlPackages.ConfigIniFiles
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".pkgs.perlPackages.FileSlurp
@@ -57,7 +57,7 @@
in
{
checks = pkgs.lib.mkIf pkgs.stdenv.isLinux {
test-flash = (import ../lib/test-base.nix) {
flash = self.clanLib.test.baseTest {
name = "flash";
nodes.target = {
virtualisation.emptyDiskImages = [ 4096 ];
@@ -79,7 +79,9 @@
testScript = ''
start_all()
machine.succeed("clan flash write --debug --flake ${../..} --yes --disk main /dev/vdb test-flash-machine-${pkgs.hostPlatform.system}")
# Some distros like to automount disks with spaces
machine.succeed('mkdir -p "/mnt/with spaces" && mkfs.ext4 /dev/vdb && mount /dev/vdb "/mnt/with spaces"')
machine.succeed("clan flash write --debug --flake ${self.checks.x86_64-linux.clan-core-for-checks} --yes --disk main /dev/vdb test-flash-machine-${pkgs.hostPlatform.system}")
'';
} { inherit pkgs self; };
};

View File

@@ -19,6 +19,7 @@
[
pkgs.gitMinimal
pkgs.nix
pkgs.coreutils
pkgs.rsync # needed to have rsync installed on the dummy ssh server
]
++ self'.packages.clan-cli-full.runtimeDependencies
@@ -30,7 +31,12 @@
# this disables dynamic dependency loading in clan-cli
export CLAN_NO_DYNAMIC_DEPS=1
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -m impure ./tests $@"
jobs=$(nproc)
# Spawning worker in pytest is relatively slow, so we limit the number of jobs to 13
# (current number of impure tests)
jobs="$((jobs > 13 ? 13 : jobs))"
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -n $jobs -m impure ./clan_cli $@"
'';
};
}

View File

@@ -1,241 +0,0 @@
{
self,
lib,
...
}:
{
# The purpose of this test is to ensure `clan machines install` works
# for machines that don't have a hardware config yet.
# If this test starts failing it could be due to the `facter.json` being out of date
# you can get a new one by adding
# client.fail("cat test-flake/machines/test-install-machine/facter.json >&2")
# to the installation test.
clan.machines.test-install-machine-without-system = {
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine-without-system ];
};
clan.machines.test-install-machine-with-system =
{ pkgs, ... }:
{
# https://git.clan.lol/clan/test-fixtures
facter.reportPath = builtins.fetchurl {
url = "https://git.clan.lol/clan/test-fixtures/raw/commit/4a2bc56d886578124b05060d3fb7eddc38c019f8/nixos-vm-facter-json/${pkgs.hostPlatform.system}.json";
sha256 =
{
aarch64-linux = "sha256:1rlfymk03rmfkm2qgrc8l5kj5i20srx79n1y1h4nzlpwaz0j7hh2";
x86_64-linux = "sha256:16myh0ll2gdwsiwkjw5ba4dl23ppwbsanxx214863j7nvzx42pws";
}
.${pkgs.hostPlatform.system};
};
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine-without-system ];
};
flake.nixosModules = {
test-install-machine-without-system =
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
../lib/minify.nix
];
networking.hostName = "test-install-machine";
environment.etc."install-successful".text = "ok";
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
# disko config
boot.loader.grub.efiSupport = lib.mkDefault true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
clan.core.vars.settings.secretStore = "vm";
clan.core.vars.generators.test = {
files.test.neededFor = "partitioning";
script = ''
echo "notok" > $out/test
'';
};
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/vda";
preCreateHook = ''
test -e /run/partitioning-secrets/test/test
'';
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";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
};
perSystem =
{
pkgs,
lib,
...
}:
let
dependencies = [
self
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.toplevel
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.diskoScript
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.clan.deployment.file
pkgs.stdenv.drvPath
pkgs.bash.drvPath
pkgs.nixos-anywhere
pkgs.bubblewrap
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
# with Nix 2.24 we get:
# vm-test-run-test-installation> client # error: sized: unexpected end-of-file
# vm-test-run-test-installation> client # error: unexpected end-of-file
# This seems to be fixed with Nix 2.26
# Remove this line once `pkgs.nix` is 2.26+
nixPackage =
assert
lib.versionOlder pkgs.nix.version "2.26"
&& lib.versionAtLeast pkgs.nixVersions.latest.version "2.26";
pkgs.nixVersions.latest;
in
{
# On aarch64-linux, hangs on reboot with after installation:
# vm-test-run-test-installation-without-system> installer # [ 288.002871] reboot: Restarting system
# vm-test-run-test-installation-without-system> client # [test-install-machine] ### Done! ###
# vm-test-run-test-installation-without-system> client # [test-install-machine] + step 'Done!'
# vm-test-run-test-installation-without-system> client # [test-install-machine] + echo '### Done! ###'
# vm-test-run-test-installation-without-system> client # [test-install-machine] + rm -rf /tmp/tmp.qb16EAq7hJ
# vm-test-run-test-installation-without-system> (finished: must succeed: clan machines install --debug --flake test-flake --yes test-install-machine-without-system --target-host root@installer --update-hardware-config nixos-facter >&2, in 154.62 seconds)
# vm-test-run-test-installation-without-system> target: starting vm
# vm-test-run-test-installation-without-system> target: QEMU running (pid 144)
# vm-test-run-test-installation-without-system> target: waiting for unit multi-user.target
# vm-test-run-test-installation-without-system> target: waiting for the VM to finish booting
# vm-test-run-test-installation-without-system> target: Guest root shell did not produce any data yet...
# vm-test-run-test-installation-without-system> target: To debug, enter the VM and run 'systemctl status backdoor.service'.
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-installation-without-system = (import ../lib/test-base.nix) {
name = "test-installation-without-system";
nodes.target = {
services.openssh.enable = true;
virtualisation.diskImage = "./target.qcow2";
virtualisation.useBootLoader = true;
nix.package = nixPackage;
};
nodes.installer =
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/auto-format-root-device.nix")
];
services.openssh.enable = true;
system.nixos.variant_id = "installer";
environment.systemPackages = [ pkgs.nixos-facter ];
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.diskSize = 8 * 1024;
virtualisation.rootDevice = "/dev/vdb";
# both installer and target need to use the same diskImage
virtualisation.diskImage = "./target.qcow2";
nix.package = nixPackage;
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"
];
};
users.users.nonrootuser = {
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
extraGroups = [ "wheel" ];
};
security.sudo.wheelNeedsPassword = false;
system.extraDependencies = dependencies;
};
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 = 3048;
nix.package = nixPackage;
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 = ''
client.start()
installer.start()
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v nonrootuser@installer hostname")
client.succeed("cp -r ${../..} test-flake && chmod -R +w test-flake")
client.fail("test -f test-flake/machines/test-install-machine-without-system/hardware-configuration.nix")
client.fail("test -f test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("clan machines update-hardware-config --flake test-flake test-install-machine-without-system nonrootuser@installer >&2")
client.succeed("test -f test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("rm test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("clan machines install --debug --flake test-flake --yes test-install-machine-without-system --target-host nonrootuser@installer --update-hardware-config nixos-facter >&2")
try:
installer.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
target.state_dir = installer.state_dir
target.start()
target.wait_for_unit("multi-user.target")
assert(target.succeed("cat /etc/install-successful").strip() == "ok")
'';
} { inherit pkgs self; };
};
};
}

View File

@@ -3,27 +3,109 @@
lib,
...
}:
let
installer =
{ modulesPath, pkgs, ... }:
let
dependencies = [
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.toplevel
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.diskoScript
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.clan.deployment.file
pkgs.stdenv.drvPath
pkgs.bash.drvPath
pkgs.nixos-anywhere
pkgs.bubblewrap
pkgs.buildPackages.xorg.lndir
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
imports = [
(modulesPath + "/../tests/common/auto-format-root-device.nix")
];
networking.useNetworkd = true;
services.openssh.enable = true;
services.openssh.settings.UseDns = false;
services.openssh.settings.PasswordAuthentication = false;
system.nixos.variant_id = "installer";
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli-full
pkgs.nixos-facter
];
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.diskSize = 8 * 1024;
virtualisation.rootDevice = "/dev/vdb";
# both installer and target need to use the same diskImage
virtualisation.diskImage = "./target.qcow2";
virtualisation.memorySize = 3048;
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"
];
};
users.users.nonrootuser = {
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [ ../assets/ssh/pubkey ];
extraGroups = [ "wheel" ];
};
security.sudo.wheelNeedsPassword = false;
system.extraDependencies = dependencies;
};
in
{
clan.machines.test-install-machine = {
clan.core.networking.targetHost = "test-install-machine";
# The purpose of this test is to ensure `clan machines install` works
# for machines that don't have a hardware config yet.
# If this test starts failing it could be due to the `facter.json` being out of date
# you can get a new one by adding
# client.fail("cat test-flake/machines/test-install-machine/facter.json >&2")
# to the installation test.
clan.machines.test-install-machine-without-system = {
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine ];
imports = [ self.nixosModules.test-install-machine-without-system ];
};
clan.machines.test-install-machine-with-system =
{ pkgs, ... }:
{
# https://git.clan.lol/clan/test-fixtures
facter.reportPath = builtins.fetchurl {
url = "https://git.clan.lol/clan/test-fixtures/raw/commit/4a2bc56d886578124b05060d3fb7eddc38c019f8/nixos-vm-facter-json/${pkgs.hostPlatform.system}.json";
sha256 =
{
aarch64-linux = "sha256:1rlfymk03rmfkm2qgrc8l5kj5i20srx79n1y1h4nzlpwaz0j7hh2";
x86_64-linux = "sha256:16myh0ll2gdwsiwkjw5ba4dl23ppwbsanxx214863j7nvzx42pws";
}
.${pkgs.hostPlatform.system};
};
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine-without-system ];
};
flake.nixosModules = {
test-install-machine =
test-install-machine-without-system =
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
../lib/minify.nix
self.clanLib.test.minifyModule
];
networking.hostName = "test-install-machine";
environment.etc."install-successful".text = "ok";
nixpkgs.hostPlatform = "x86_64-linux";
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
@@ -34,7 +116,7 @@
clan.core.vars.generators.test = {
files.test.neededFor = "partitioning";
script = ''
echo "notok" > $out/test
echo "notok" > "$out"/test
'';
};
disko.devices = {
@@ -80,138 +162,73 @@
};
};
};
perSystem =
{
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.bash.drvPath
pkgs.stdenv.drvPath
pkgs.nixos-anywhere
pkgs.bubblewrap
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
# with Nix 2.24 we get:
# vm-test-run-test-installation> client # error: sized: unexpected end-of-file
# vm-test-run-test-installation> client # error: unexpected end-of-file
# This seems to be fixed with Nix 2.26
# Remove this line once `pkgs.nix` is 2.26+
nixPackage =
assert
lib.versionOlder pkgs.nix.version "2.26"
&& lib.versionAtLeast pkgs.nixVersions.latest.version "2.26";
pkgs.nixVersions.latest;
in
{
# On aarch64-linux, hangs on reboot with after installation:
# vm-test-run-test-installation> (finished: waiting for the VM to power off, in 1.97 seconds)
# vm-test-run-test-installation>
# vm-test-run-test-installation> new_machine: must succeed: cat /etc/install-successful
# vm-test-run-test-installation> new_machine: waiting for the VM to finish booting
# vm-test-run-test-installation> new_machine: starting vm
# vm-test-run-test-installation> new_machine: QEMU running (pid 80)
# vm-test-run-test-installation> new_machine: Guest root shell did not produce any data yet...
# vm-test-run-test-installation> new_machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
# vm-test-run-test-installation-> installer # [ 288.002871] reboot: Restarting system
# vm-test-run-test-installation-> server # [test-install-machine] ### Done! ###
# vm-test-run-test-installation-> server # [test-install-machine] + step 'Done!'
# vm-test-run-test-installation-> server # [test-install-machine] + echo '### Done! ###'
# vm-test-run-test-installation-> server # [test-install-machine] + rm -rf /tmp/tmp.qb16EAq7hJ
# vm-test-run-test-installation-> (finished: must succeed: clan machines install --debug --flake test-flake --yes test-install-machine --target-host root@installer --update-hardware-config nixos-facter >&2, in 154.62 seconds)
# vm-test-run-test-installation-> target: starting vm
# vm-test-run-test-installation-> target: QEMU running (pid 144)
# vm-test-run-test-installation-> target: waiting for unit multi-user.target
# vm-test-run-test-installation-> target: waiting for the VM to finish booting
# vm-test-run-test-installation-> target: Guest root shell did not produce any data yet...
# vm-test-run-test-installation-> target: To debug, enter the VM and run 'systemctl status backdoor.service'.
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-installation = (import ../lib/test-base.nix) {
name = "test-installation";
installation = self.clanLib.test.baseTest {
name = "installation";
nodes.target = {
services.openssh.enable = true;
virtualisation.diskImage = "./target.qcow2";
virtualisation.useBootLoader = true;
nix.package = nixPackage;
# virtualisation.fileSystems."/" = {
# device = "/dev/disk/by-label/this-is-not-real-and-will-never-be-used";
# fsType = "ext4";
# };
};
nodes.installer =
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/auto-format-root-device.nix")
];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
system.nixos.variant_id = "installer";
environment.systemPackages = [ pkgs.nixos-facter ];
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.diskSize = 8 * 1024;
virtualisation.rootDevice = "/dev/vdb";
# both installer and target need to use the same diskImage
virtualisation.diskImage = "./target.qcow2";
nix.package = nixPackage;
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;
};
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 = 3048;
nix.package = nixPackage;
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;
};
nodes.installer = installer;
testScript = ''
client.start()
installer.start()
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v root@installer hostname")
client.succeed("cp -r ${../..} test-flake && chmod -R +w test-flake")
installer.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../assets/ssh/privkey} /root/.ssh/id_ed25519")
# test that we can generate hardware configurations
client.fail("test -f test-flake/machines/test-install-machine/facter.json")
client.fail("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
client.succeed("clan machines update-hardware-config --flake test-flake test-install-machine root@installer >&2")
client.succeed("test -f test-flake/machines/test-install-machine/facter.json")
client.succeed("clan machines update-hardware-config --backend nixos-generate-config --flake test-flake test-install-machine root@installer>&2")
client.succeed("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
installer.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v nonrootuser@localhost hostname")
installer.succeed("cp -r ${self.checks.x86_64-linux.clan-core-for-checks} test-flake && chmod -R +w test-flake")
# but we don't use them because they're not cached
client.succeed("rm test-flake/machines/test-install-machine/hardware-configuration.nix test-flake/machines/test-install-machine/facter.json")
client.succeed("clan machines install --debug --flake test-flake --yes test-install-machine --target-host root@installer >&2")
try:
installer.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
installer.succeed("clan machines install --no-reboot --debug --flake test-flake --yes test-install-machine-without-system --target-host nonrootuser@localhost --update-hardware-config nixos-facter >&2")
installer.shutdown()
# We are missing the test instrumentation somehow. Test this later.
target.state_dir = installer.state_dir
target.start()
target.wait_for_unit("multi-user.target")
assert(target.succeed("cat /etc/install-successful").strip() == "ok")
'';
} { inherit pkgs self; };
update-hardware-configuration = self.clanLib.test.baseTest {
name = "update-hardware-configuration";
nodes.installer = installer;
testScript = ''
installer.start()
installer.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../assets/ssh/privkey} /root/.ssh/id_ed25519")
installer.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v nonrootuser@localhost hostname")
installer.succeed("cp -r ${self.checks.x86_64-linux.clan-core-for-checks} test-flake && chmod -R +w test-flake")
installer.fail("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
installer.fail("test -f test-flake/machines/test-install-machine/facter.json")
installer.succeed("clan machines update-hardware-config --debug --flake test-flake test-install-machine-without-system nonrootuser@localhost >&2")
installer.succeed("test -f test-flake/machines/test-install-machine-without-system/facter.json")
installer.succeed("rm test-flake/machines/test-install-machine-without-system/facter.json")
installer.succeed("clan machines update-hardware-config --debug --backend nixos-generate-config --flake test-flake test-install-machine-without-system nonrootuser@localhost >&2")
installer.succeed("test -f test-flake/machines/test-install-machine-without-system/hardware-configuration.nix")
installer.succeed("rm test-flake/machines/test-install-machine-without-system/hardware-configuration.nix")
'';
} { inherit pkgs self; };
};

View File

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

View File

@@ -1,43 +0,0 @@
test:
{ pkgs, self, ... }:
let
inherit (pkgs) lib;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest (
{ hostPkgs, ... }:
{
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
boot.isContainer = true;
# needed since nixpkgs 7fb2f407c01b017737eafc26b065d7f56434a992 removed the getty unit by default
console.enable = true;
# 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;
# we don't have permission to set cpu scheduler in our container
systemd.services.nix-daemon.serviceConfig.CPUSchedulingPolicy = lib.mkForce "";
};
# to accept external dependencies such as disko
node.specialArgs.self = self;
_module.args = { inherit self; };
imports = [
test
./container-driver/module.nix
];
}
)).config.result

View File

@@ -1,26 +0,0 @@
test:
{ pkgs, self, ... }:
let
inherit (pkgs) lib;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest {
hostPkgs = pkgs;
# speed-up evaluation
defaults = (
{ config, ... }:
{
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
nix.settings.min-free = 0;
system.stateVersion = config.system.nixos.release;
}
);
_module.args = { inherit self; };
# to accept external dependencies such as disko
node.specialArgs.self = self;
imports = [ test ];
}).config.result

View File

@@ -1,4 +1,4 @@
(import ../lib/container-test.nix) (
(
{ pkgs, ... }:
{
name = "matrix-synapse";
@@ -15,7 +15,6 @@
self.clanModules.matrix-synapse
self.nixosModules.clanCore
{
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
services.nginx.virtualHosts."matrix.clan.test" = {

View File

@@ -24,7 +24,7 @@
}:
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-morph = (import ../lib/test-base.nix) {
morph = self.clanLib.test.baseTest {
name = "morph";
nodes = {
@@ -32,8 +32,6 @@
{ pkgs, ... }:
let
dependencies = [
self
pkgs.nixos-anywhere
pkgs.stdenv.drvPath
pkgs.stdenvNoCC
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
@@ -45,14 +43,18 @@
{
environment.etc."install-closure".source = "${closureInfo}/store-paths";
system.extraDependencies = dependencies;
virtualisation.memorySize = 2048;
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
virtualisation.useNixStoreImage = true;
virtualisation.writableStore = true;
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli-full ];
};
};
testScript = ''
start_all()
actual.fail("cat /etc/testfile")
actual.succeed("env CLAN_DIR=${self} clan machines morph test-morph-template --i-will-be-fired-for-using-this --debug --name test-morph-machine")
actual.succeed("env CLAN_DIR=${self.checks.x86_64-linux.clan-core-for-checks} clan machines morph test-morph-template --i-will-be-fired-for-using-this --debug --name test-morph-machine")
assert actual.succeed("cat /etc/testfile") == "morphed"
'';
} { inherit pkgs self; };

View File

@@ -8,5 +8,8 @@
(modulesPath + "/profiles/minimal.nix")
];
virtualisation.useNixStoreImage = true;
virtualisation.writableStore = true;
clan.core.enableRecommendedDefaults = false;
}

View File

@@ -1,145 +1,130 @@
(import ../lib/test-base.nix) (
{ ... }:
let
common =
{ self, pkgs, ... }:
{
imports = [
self.clanModules.mumble
{
clan.services.mumble.user = "alice";
}
self.nixosModules.clanCore
(self.inputs.nixpkgs + "/nixos/tests/common/x11.nix")
{
clan.core.settings.directory = ./.;
environment.systemPackages = [ pkgs.killall ];
clan.core.facts.services.mumble.secret."mumble-key".path = "/etc/mumble-key";
clan.core.facts.services.mumble.public."mumble-cert".path = "/etc/mumble-cert";
}
];
{
pkgs,
self,
clanLib,
...
}:
clanLib.test.makeTestClan {
inherit pkgs self;
# TODO: container driver does not support: sleep, wait_for_window, send_chars, wait_for_text
useContainers = false;
nixosTest = (
{ lib, ... }:
let
common =
{ pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/x11.nix")
];
clan.services.mumble.user = "alice";
environment.systemPackages = [ pkgs.killall ];
};
machines = [
"peer1"
"peer2"
];
in
{
name = "mumble";
clan = {
directory = ./.;
inventory = {
machines = lib.genAttrs machines (_: { });
services = {
mumble.default = {
roles.server.machines = machines;
};
};
};
};
in
{
name = "mumble";
enableOCR = true;
enableOCR = true;
nodes.peer1 =
{ ... }:
{
imports = [
common
{
clan.core.settings.machine.name = "peer1";
environment.etc = {
"mumble-key".source = ./peer_1/peer_1_test_key;
"mumble-cert".source = ./peer_1/peer_1_test_cert;
};
systemd.tmpfiles.settings."vmsecrets" = {
"/var/lib/murmur/sslKey" = {
C.argument = "${./peer_1/peer_1_test_key}";
z = {
mode = "0400";
user = "murmur";
};
};
"/var/lib/murmur/sslCert" = {
C.argument = "${./peer_1/peer_1_test_cert}";
z = {
mode = "0400";
user = "murmur";
};
};
};
clan.core.facts.services.mumble.secret."mumble-key".path = "/etc/mumble-key";
clan.core.facts.services.mumble.public."mumble-cert".path = "/etc/mumble-cert";
}
];
};
nodes.peer2 =
{ ... }:
{
imports = [
common
{
clan.core.settings.machine.name = "peer2";
environment.etc = {
"mumble-key".source = ./peer_2/peer_2_test_key;
"mumble-cert".source = ./peer_2/peer_2_test_cert;
};
systemd.tmpfiles.settings."vmsecrets" = {
"/var/lib/murmur/sslKey" = {
C.argument = "${./peer_2/peer_2_test_key}";
z = {
mode = "0400";
user = "murmur";
};
};
"/var/lib/murmur/sslCert" = {
C.argument = "${./peer_2/peer_2_test_cert}";
z = {
mode = "0400";
user = "murmur";
};
};
};
}
];
};
testScript = ''
start_all()
nodes.peer1 = common;
nodes.peer2 = common;
with subtest("Waiting for x"):
peer1.wait_for_x()
peer2.wait_for_x()
testScript = ''
import time
import re
with subtest("Waiting for murmur"):
peer1.wait_for_unit("murmur.service")
peer2.wait_for_unit("murmur.service")
with subtest("Starting Mumble"):
# starting mumble is blocking
peer1.execute("mumble >&2 &")
peer2.execute("mumble >&2 &")
def machine_has_text(machine: Machine, regex: str) -> bool:
variants = machine.get_screen_text_variants()
# for debugging
# machine.screenshot(f"/tmp/{machine.name}.png")
for text in variants:
print(f"Expecting '{regex}' in '{text}'")
if re.search(regex, text) is not None:
return True
return False
with subtest("Wait for Mumble"):
peer1.wait_for_window(r"^Mumble$")
peer2.wait_for_window(r"^Mumble$")
start_all()
with subtest("Wait for certificate creation"):
peer1.wait_for_window(r"^Mumble$")
peer1.sleep(3) # mumble is slow to register handlers
peer1.send_chars("\n")
peer1.send_chars("\n")
peer2.wait_for_window(r"^Mumble$")
peer2.sleep(3) # mumble is slow to register handlers
peer2.send_chars("\n")
peer2.send_chars("\n")
with subtest("Waiting for x"):
peer1.wait_for_x()
peer2.wait_for_x()
with subtest("Wait for server connect"):
peer1.wait_for_window(r"^Mumble Server Connect$")
peer2.wait_for_window(r"^Mumble Server Connect$")
with subtest("Waiting for murmur"):
peer1.wait_for_unit("murmur.service")
peer2.wait_for_unit("murmur.service")
with subtest("Check validity of server certificates"):
peer1.execute("killall .mumble-wrapped")
peer1.sleep(1)
peer1.execute("mumble mumble://peer2 >&2 &")
peer1.wait_for_window(r"^Mumble$")
peer1.sleep(3) # mumble is slow to register handlers
peer1.send_chars("\n")
peer1.send_chars("\n")
peer1.wait_for_text("Connected.")
with subtest("Starting Mumble"):
# starting mumble is blocking
peer1.execute("mumble >&2 &")
peer2.execute("mumble >&2 &")
peer2.execute("killall .mumble-wrapped")
peer2.sleep(1)
peer2.execute("mumble mumble://peer1 >&2 &")
peer2.wait_for_window(r"^Mumble$")
peer2.sleep(3) # mumble is slow to register handlers
peer2.send_chars("\n")
peer2.send_chars("\n")
peer2.wait_for_text("Connected.")
'';
}
)
with subtest("Wait for Mumble"):
peer1.wait_for_window(r"Mumble")
peer2.wait_for_window(r"Mumble")
with subtest("Wait for certificate creation"):
peer1.wait_for_window(r"Mumble")
peer2.wait_for_window(r"Mumble")
for i in range(20):
time.sleep(1)
peer1.send_chars("\n")
peer1.send_chars("\n")
peer2.send_chars("\n")
peer2.send_chars("\n")
if machine_has_text(peer1, r"Mumble Server Connect") and \
machine_has_text(peer2, r"Mumble Server Connect"):
break
else:
raise Exception("Timeout waiting for certificate creation")
with subtest("Check validity of server certificates"):
peer1.execute("killall .mumble-wrapped")
peer1.sleep(1)
peer1.execute("mumble mumble://peer2 >&2 &")
peer1.wait_for_window(r"Mumble")
for i in range(20):
time.sleep(1)
peer1.send_chars("\n")
peer1.send_chars("\n")
if machine_has_text(peer1, "Connected."):
break
else:
raise Exception("Timeout waiting for certificate creation")
peer2.execute("killall .mumble-wrapped")
peer2.sleep(1)
peer2.execute("mumble mumble://peer1 >&2 &")
peer2.wait_for_window(r"Mumble")
for i in range(20):
time.sleep(1)
peer2.send_chars("\n")
peer2.send_chars("\n")
if machine_has_text(peer2, "Connected."):
break
else:
raise Exception("Timeout waiting for certificate creation")
'';
}
);
}

View File

@@ -0,0 +1,6 @@
[
{
"publickey": "age1987metkajgdefk0sfhjqjjtczy9eu2lsg700rwcac6hhy2alhdsshjmpw8",
"type": "age"
}
]

View File

@@ -0,0 +1,6 @@
[
{
"publickey": "age1fndalxxeduekn5s8q3znl73vjfx2n8kydylyrc2j3aurc93pypvs6pcql4",
"type": "age"
}
]

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:TfEsytctWPCLuo/icbicgRfy7O/txYCllTiLiUlusagGShZyXyIR46TNL9E4XWI2Lce9hIn8zczOdUWaEFPuXcvRMMMWILY3DzI=,iv:zDdq0rdYz/KIwKvIiu9MvKyX9v1pWYxZG3F/7KllBa0=,tag:mTPJGmJ+tKrgYaCZXJ37Nw==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2MmFpbUJuNzRnNGRlQXcy\naEhRanpHbjZpbFZxVkZ2TXFJWk8xYm9lYmlVCmVhRFdDZyt4SjJick1CdnZseWx1\nMGdvaTBYekdBeFUyaHEvTzNJVVM4TncKLS0tIG8rZ1kyTFJTRndQNFVXOC9OTTc5\nZHZGVW1FTzlLQ0RRcjNWeEpVWmVKMDgK7UDm509nexdHqG2xU8CBDZkRStjQIAAN\nDmOz5A8uWpIiyvU2LdOBcc/FQKHaXjB7OAmfT03nJccOeqSF2N3N3g==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-16T16:40:26Z",
"mac": "ENC[AES256_GCM,data:5Qe20lbqERvSM5fDY9Orhrtv2U6zholh6uHMq0CqV1OOg+vVWSlqTqJrtz2rD/qQTUECRKzWUHB1D/kgLrJ33lRoEMqrhjmvBfxtDnNjLzoYITlLcYOm9qiv3gOqcrpdBKW10YyNlGP/+Q377Lfbo8tcZ8nmuaT8qA9PYr+AKcs=,iv:IIJEFAvoX9SY3jvkD0xVe1/L6iRPMyzmxeRmpGvZI0I=,tag:1D3BBUjj1suNeL+mVYDiKw==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.1"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:NI9y5OdFkBgHf+wfn+ISDL11nh/ud+1RV5SPC64TV4Hvg0w8GKkmjJI5uiGDGI1+FfWwnHWOFexavtM2ZJr/cWfhA6dGKvzrKJc=,iv:itiZFGsGEZD/SH42akh1CLCDbuZxMSj05quMNKwvKg4=,tag:v36FGDDHIuFaABHG9we6ag==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByUVVJek9Ha2ljMkt4U2pi\nSmRRd2g2R0VXZGlySG5TT1E1czFpaWFyNlFjCmRJOThCQWlCNDZnRVRFVHpSTzBW\nOWZCUU5jK2dGQTloOEZMUFFVdk04cXMKLS0tIDVzSTdXRk1UZ3psd29kdnVUcitM\nbFlqb0srUGFCVUhlNzU1dUdTTUkwN0UKAIslz1WCMZWrE+aLPJjeM+wZSXMmwnqx\nyRZT5vVzCPWv2r8sbIjhi1rFbkfF+NXHkzNZD9NS4zddwsDsz5HO1g==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-04-16T16:40:48Z",
"mac": "ENC[AES256_GCM,data:2iDDnVdLPWxYcjdZrDlTb8PzPVOPEZ06QXCFvnZ2gf8ioXPiSY69ZAHRHTGpqCEp5Ve7qTIELbNja2TGU0ONLIcIRWyzqgc4q+G3n2V5fYQURW114pzaK0Ct6r6yR9oZQy8H66uEYQafkyuN2R9++3w5G0LGj8UovPcYQqNEQVo=,iv:TkCAdIgjRpZpsnhhvTfMqGVD/IveFyobYa9SExFWcC4=,tag:4RLhumGqeLT15waqHT0mRg==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.1"
}
}

View File

@@ -0,0 +1 @@
../../../users/admin

View File

@@ -0,0 +1,4 @@
{
"publickey": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"type": "age"
}

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