Compare commits

...

2303 Commits

Author SHA1 Message Date
DavHau
84a21d1bab generate_test_vars: fix it 2025-07-09 16:20:37 +07:00
kenji
28d5294292 Merge pull request 'pkgs/clan: Add test for clan flash list' (#4281) from kenji/ke-test-flash into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4281
2025-07-09 09:08:34 +00:00
a-kenji
3a52189ed6 pkgs/clan: Add test for clan flash list
Add a test for `clan flash list`.
This tests the basic functionality, as well as that listing actually
works.
2025-07-09 11:02:24 +02:00
kenji
5c33e02e24 Merge pull request 'pkgs/clan: Add test for clan templates list' (#4282) from kenji/ke-test-templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4282
2025-07-09 08:37:26 +00:00
a-kenji
2aa2145876 pkgs/clan: Add test for clan templates list
Add a test for clan templates list.
This tests the basic functionality, as well as that listing actually
works.
2025-07-09 10:29:29 +02:00
hsjobeki
fa517e1149 Merge pull request 'openapi: improve spec compat with swagger.io' (#4279) from openapi into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4279
2025-07-09 07:52:49 +00:00
Johannes Kirschbauer
3828a0cf49 openapi: improve spec compat with swagger.io 2025-07-09 09:40:06 +02:00
hsjobeki
75501a914b Merge pull request 'API Improvements' (#4276) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4276
2025-07-08 21:17:12 +00:00
Johannes Kirschbauer
c9b8bdd6de api/docs: sort resources into tree order 2025-07-08 23:06:20 +02:00
hsjobeki
5a4a7e9158 Merge pull request 'UI: init cubes scene' (#4277) from ui-scene into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4277
2025-07-08 20:40:42 +00:00
Johannes Kirschbauer
83ad0ae836 UI: fix lint 2025-07-08 22:36:14 +02:00
Johannes Kirschbauer
57163cf135 UI: Cubes improve memory usage 2025-07-08 22:33:52 +02:00
Johannes Kirschbauer
13185d005d UI: dispay selected cube base 2025-07-08 22:14:44 +02:00
Johannes Kirschbauer
18a6b57673 UI: Init CubesScene
UI: init cube base scene
2025-07-08 22:14:42 +02:00
kenji
31f2c5106d Merge pull request 'refactor: decouple vars stores from machine instances' (#4269) from davhau/vars-new into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4269
2025-07-08 18:11:03 +00:00
Johannes Kirschbauer
4dfd151cd2 api: rename 'run_machine_deploy' into 'run_machine_update' 2025-07-08 17:21:18 +02:00
Johannes Kirschbauer
8ddd2b607e api/disk_schema: make getter consistent 2025-07-08 17:20:59 +02:00
hsjobeki
b4544b824a Merge pull request 'api/disk_schema: rename getter consistent' (#4274) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4274
2025-07-08 14:43:29 +00:00
hsjobeki
50122c2215 Merge pull request 'docs: disable footer navigation' (#4275) from docs-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4275
2025-07-08 14:42:36 +00:00
Johannes Kirschbauer
c65b35edc1 docs: disable footer navigation
This gives the content more space
Especially for plugins (options, developer tabs)
2025-07-08 16:38:33 +02:00
Johannes Kirschbauer
2eb6ee2264 api/disk_schema: make getter consistent 2025-07-08 16:31:51 +02:00
hsjobeki
ec1363aedf Merge pull request 'UI: remove 2d-ui, its broken now since we deleted the symlinked files in #4266' (#4273) from ui-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4273
2025-07-08 14:28:56 +00:00
Johannes Kirschbauer
90495d4157 UI: remove 2d-ui, its broken now since we deleted the symlinked files in #4266 2025-07-08 16:23:30 +02:00
kenji
b8fa4b4677 Merge pull request 'pkgs/cli: Add regression test for clan show' (#4272) from kenji/ke-test-add-show into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4272
2025-07-08 14:01:02 +00:00
a-kenji
ec8effcd46 pkgs/cli: Add regression test for clan show 2025-07-08 15:55:01 +02:00
hsjobeki
09b8e2f49c Merge pull request 'Templates/default: move clan configuration into its own file' (#4262) from templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4262
2025-07-08 13:46:19 +00:00
Johannes Kirschbauer
7fefc8e3b2 Tests: dont expect a hardware-configuration.nix file 2025-07-08 15:34:16 +02:00
Johannes Kirschbauer
62cadb8fbe Docs: mention clan.nix file, which is present in the default template now 2025-07-08 14:58:24 +02:00
Johannes Kirschbauer
f8748d021b tests: dont expect .clan-flake file, it is not strictly required 2025-07-08 14:58:24 +02:00
kenji
b84df095a2 Merge pull request 'templates(minimal): Add .envrc' (#4268) from kenji/ke-template into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4268
2025-07-08 11:58:36 +00:00
DavHau
dbd48a54a3 refactor: decouple vars stores from machine instances
Stores now get machine context from generator objects instead of storing
it internally. This enables future machine-independent generators and
reduces coupling.

- StoreBase.__init__ only takes flake parameter
- Store methods receive machine as explicit parameter
- Fixed all callers to pass machine context
2025-07-08 18:30:16 +07:00
Luis Hebendanz
3b2f0e2029 Merge pull request 'Add middleware interface to clan-app' (#4265) from Qubasa/clan-core:generalize_webview into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4265
2025-07-08 11:16:36 +00:00
Qubasa
639d227055 clan-app: Fix delete tasks
clan-app: Fix delete tasks
2025-07-08 18:11:59 +07:00
a-kenji
7ac4d257d9 templates(minimal): Add .envrc
Add .envrc also to the minimal template to homogenize our templates.
2025-07-08 13:09:04 +02:00
brianmcgee
e45e809553 Merge pull request 'prep-ui-version2' (#4266) from prep-ui-version2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4266
2025-07-08 10:57:54 +00:00
Qubasa
48c7613556 clan-cli: Add verb 'cancel' to openapi 2025-07-08 17:43:14 +07:00
Brian McGee
fe89d954da fix(ui): display required asterisk in label 2025-07-08 11:41:34 +01:00
Brian McGee
b8604d334b feat(ui): prep V2
Preparation for rebuilding the UI with V2 components.
2025-07-08 11:41:33 +01:00
Qubasa
50cbe3c825 clan-app: Move json.loads to try catch 2025-07-08 17:38:24 +07:00
Qubasa
acab3b8905 clan-app: Ignore ruff errors 2025-07-08 17:32:59 +07:00
Qubasa
eb6166796c clan-app: Generalize architecture for API requests 2025-07-08 17:32:59 +07:00
Qubasa
6d8fd42faa clan-app: Add plug and play middleware interface 2025-07-08 17:32:59 +07:00
Qubasa
494830326d clan-app: Add plug and play middleware interface 2025-07-08 17:32:59 +07:00
Luis Hebendanz
edfad04305 Merge pull request 'fix_ruff_regression' (#4264) from Qubasa/clan-core:fix_ruff_regression into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4264
2025-07-08 10:30:45 +00:00
Qubasa
81d3437ff7 clan-cli: Fix Ruff linting errors
clan-cli: Ruff fixes

ignore noqa lint

fix more ruff issues
2025-07-08 17:25:02 +07:00
Qubasa
d656167cf2 ruff: Ignore TRY301 'raise-within-try' as there are legitimate reasons to do this 2025-07-08 17:23:32 +07:00
Qubasa
49e83954c5 clan-cli: Fix regression in ruff linter, where linter rules got overriden by local pyproject.toml
clan-app: Fix ruff regression where linter rules got overriden by local pyproject.toml
2025-07-08 17:23:32 +07:00
Johannes Kirschbauer
8d1e0353f8 test: don't expect a machines folder 2025-07-08 11:53:20 +02:00
Johannes Kirschbauer
05658589a0 Docs: execute 'clan show' as first step 2025-07-08 10:24:01 +02:00
Johannes Kirschbauer
809a115e58 clan/show: fix cli command 2025-07-08 10:15:35 +02:00
Johannes Kirschbauer
79d8d0707b Templates/default/modules/gnome: Add doc-comment - what the module does, how to use it 2025-07-08 10:06:22 +02:00
Johannes Kirschbauer
b2179c9293 Templates/default: remove predefined machines 2025-07-08 10:05:35 +02:00
Johannes Kirschbauer
e33af96705 Templates/default: move clan configuration into its own file
Doing this with the idea in mind, that flake-parts / default should define the same clan in clan.nix
We can add a CI check to ensure both are the same files
They got desynced in the past and describe completely different clans now
2025-07-08 10:04:17 +02:00
Johannes Kirschbauer
14a221d1d1 Docs: remove 'replaces' sentence; it is not describing any purpose 2025-07-08 10:01:51 +02:00
brianmcgee
9f9ab3de19 Merge pull request 'feat(ui): SidebarPane component' (#4248) from ui/sidebar-pane into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4248
2025-07-08 07:37:47 +00:00
hsjobeki
9739a5ae2b Merge pull request 'templates: rename 'new_clan' to default' (#4244) from templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4244
2025-07-08 07:31:22 +00:00
Mic92
54446d751f Merge pull request 'checks/backup: no longer depend on self' (#4258) from self into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4258
2025-07-07 19:57:30 +00:00
Jörg Thalheim
7bc8e091a5 checks/backup: no longer depend on self 2025-07-07 21:51:51 +02:00
Mic92
3462d458ac Merge pull request 'override-inputs: filter out self' (#4257) from improve-perf into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4257
2025-07-07 19:32:51 +00:00
Jörg Thalheim
bd42d67b0c override-inputs: filter out self 2025-07-07 21:25:33 +02:00
Mic92
d99ca36f9f Merge pull request 'checks/eval-module-clan-vars: optimize to use filtered source' (#4255) from borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4255
2025-07-07 19:02:25 +00:00
Jörg Thalheim
57f9cd9eee checks/eval-module-clan-vars: optimize to use filtered source
- Replace self.filter with lib.fileset for more precise filtering
- Remove unnecessary clan-core dependency from the test
- Test only needs lib and pkgs, not the full flake context
- Prevents unnecessary rebuilds when unrelated files change
2025-07-07 20:55:04 +02:00
Mic92
a9ec94b0df Merge pull request 'checks/inventory: optimize eval tests to use filtered sources' (#4254) from borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4254
2025-07-07 18:48:58 +00:00
Jörg Thalheim
c64dbceceb checks/inventory: optimize eval tests to use filtered sources
Replace full flake source (self) with minimal filtered filesets to prevent
unnecessary rebuilds when unrelated files change. All three inventory eval
tests now use the same unified fileset containing only necessary files.

This follows the same optimization pattern applied to other eval tests,
significantly reducing rebuild frequency during development.
2025-07-07 20:41:20 +02:00
Mic92
5d924e0c98 Merge pull request 'docs: no longer depend on self' (#4253) from borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4253
2025-07-07 18:31:35 +00:00
Jörg Thalheim
6a6688019b docs: no longer depend on self 2025-07-07 20:24:11 +02:00
Mic92
f33172fa73 Merge pull request 'don't rebuild eval tests on each ci run' (#4252) from borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4252
2025-07-07 18:13:57 +00:00
Jörg Thalheim
00914311a4 don't rebuild eval tests on each ci run 2025-07-07 20:05:45 +02:00
Mic92
ceeb40d9ac Merge pull request 'checks/borgbackup: don't rebuild on every pull request' (#4251) from borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4251
2025-07-07 17:44:16 +00:00
Jörg Thalheim
afab33056e checks/borgbackup: don't rebuild on every pull request 2025-07-07 19:35:48 +02:00
Mic92
a5183f4b4c Merge pull request 'avoid shebang in update-private-flake-inputs' (#4250) from fix-devflake-tryeval into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4250
2025-07-07 16:56:21 +00:00
Jörg Thalheim
a686d7523b avoid shebang in update-private-flake-inputs 2025-07-07 18:48:11 +02:00
Mic92
56b784992d Merge pull request 'devFlake: don't load if sources have been filtered out' (#4249) from fix-devflake-tryeval into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4249
2025-07-07 16:47:27 +00:00
Jörg Thalheim
5f723dc376 devFlake: don't load if sources have been filtered out 2025-07-07 18:38:01 +02:00
Brian McGee
1609989734 feat(ui): SidebarPane component
* implement Divider component using Kobalte's Separator
* refine read only state of form components to match the Sidebar Pane design
* introduce a SidebarPane component with sections that can toggle between editing and view states.
2025-07-07 17:31:58 +01:00
Mic92
0c07d5cfe0 Merge pull request 'add dev flake pattern' (#4245) from private-flake into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4245
2025-07-07 16:02:29 +00:00
Jörg Thalheim
9c37ef4cbe add dev flake pattern
This allows us to have dev dependencies which are not propagated to the user.
2025-07-07 15:59:09 +00:00
Jörg Thalheim
783b6a8b06 add gitea action to update private flake inputs 2025-07-07 15:59:09 +00:00
Jörg Thalheim
4f13049ee2 put flake input overrides into a helper function 2025-07-07 15:59:09 +00:00
Johannes Kirschbauer
2f4f303048 create/clan: do initial commit 2025-07-07 15:50:00 +00:00
Johannes Kirschbauer
d02868b950 templates: add .gitignore files to all templates 2025-07-07 15:50:00 +00:00
Johannes Kirschbauer
4f7d82671f Templates: remove 'minimal-flake-parts' 2025-07-07 15:50:00 +00:00
Johannes Kirschbauer
0dce3fc7ec templates: rename 'new_clan' to default 2025-07-07 15:50:00 +00:00
brianmcgee
a635f9c6fe Merge pull request 'ui: Modal component' (#4241) from feat/modal into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4241
2025-07-07 15:16:50 +00:00
Mic92
a8ed1c30e4 Merge pull request 'make treefmt work with git-worktrees' (#4246) from pytest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4246
2025-07-07 15:07:53 +00:00
Jörg Thalheim
c0c41d52bd make treefmt work with git-worktrees 2025-07-07 16:55:36 +02:00
hsjobeki
bb236bb543 Merge pull request 'Docs: add missing documentation to api functions' (#4243) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4243
2025-07-07 14:02:08 +00:00
Johannes Kirschbauer
d7cf79faa7 openapi: error on missing api function docstring 2025-07-07 15:48:36 +02:00
Johannes Kirschbauer
dab11cb020 docs/api: add docstrings to {list_mdns_services, set_clan_details} 2025-07-07 15:47:14 +02:00
Johannes Kirschbauer
f2cb6fef41 api: remove unused get_directory 2025-07-07 15:45:51 +02:00
Johannes Kirschbauer
655b87ad04 docs/api: add docstrings to {run_machine_install,run_machine_deploy} 2025-07-07 15:41:02 +02:00
Johannes Kirschbauer
d462ae501e docs/api: add docstrings to {check_machine_ssh_login} 2025-07-07 15:38:09 +02:00
Johannes Kirschbauer
59a8c402ba docs/api: add docstrings to {delete_machine} 2025-07-07 15:36:16 +02:00
Johannes Kirschbauer
3b309ea74b docs/api: add docstrings to {get_flash_options, run_machine_flash} 2025-07-07 15:34:49 +02:00
Johannes Kirschbauer
508cd3c784 docs/api: add docstrings to {get_clan_details} 2025-07-07 15:31:06 +02:00
Johannes Kirschbauer
2bff7403df docs/api: add docstrings to {create_clan} 2025-07-07 15:29:19 +02:00
Johannes Kirschbauer
b5a6e809d0 docs/api: add docstrings to {get_generators, run_generators} 2025-07-07 15:22:44 +02:00
Johannes Kirschbauer
ec28c5c307 api/machines: document {get_machine,get_machine_details} 2025-07-07 15:13:23 +02:00
hsjobeki
10f9e5d11b Merge pull request 'api/generators: remove term 'vars' interact purely with 'generators'' (#4242) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4242
2025-07-07 13:04:00 +00:00
Johannes Kirschbauer
b8ba8b79ca api/check_machine_ssh_reachable: add function docs 2025-07-07 15:02:35 +02:00
Johannes Kirschbauer
fd07d02d2d openapi: warn on missing description 2025-07-07 14:52:49 +02:00
Johannes Kirschbauer
2a3d1efc6f api: expose docstring as function description 2025-07-07 14:51:15 +02:00
Johannes Kirschbauer
947e0a5488 openapi: add strict verb checking 2025-07-07 14:35:56 +02:00
Mic92
57b5520143 Merge pull request 'Add missing f to f-string' (#4234) from jfly/clan-core:oops-f-string into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4234
2025-07-07 12:30:20 +00:00
Mic92
9fd1031f4d Merge pull request 'Fix bug? member_id -> member_ip' (#4235) from jfly/clan-core:possible-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4235
2025-07-07 12:30:08 +00:00
Johannes Kirschbauer
c382e8f1f3 api/tasks: rename 'cancel_task' into 'delete_task' 2025-07-07 14:07:53 +02:00
Johannes Kirschbauer
cf92303f31 api/hw: rename 'describe_machine_hardware' into 'get_machine_hardware_summary' 2025-07-07 14:05:57 +02:00
Johannes Kirschbauer
80d0dc9805 api/hw: rename generate_machine_hardware_info into 'run' 2025-07-07 14:04:39 +02:00
Johannes Kirschbauer
4e2cbb188c api/generators: remove term 'vars' interact purely with 'generators' 2025-07-07 13:59:12 +02:00
Brian McGee
eb6460fb40 feat(ui): update playwright to match version in nixpkgs 2025-07-07 12:51:22 +01:00
hsjobeki
155bd36d2b Merge pull request 'api/tasks: prefix impure actions with run' (#4239) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4239
2025-07-07 11:28:07 +00:00
Johannes Kirschbauer
40ea5bf591 api/machine checks: rename, add checkResult 2025-07-07 13:13:00 +02:00
hsjobeki
0cd9c84de0 Merge pull request 'machine/host: degrade into info and add docs' (#4238) from host-info into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4238
Reviewed-by: Luis Hebendanz <consulting@qube.email>
2025-07-07 11:10:05 +00:00
Johannes Kirschbauer
e1ea44a2cc api/clan: rename 'update_clan_meta' -> 'set_clan_details' 2025-07-07 12:51:32 +02:00
Johannes Kirschbauer
7c4865e8b0 api/keygen: add todo comment 2025-07-07 12:49:37 +02:00
Johannes Kirschbauer
b032cd4a29 api/admin: remove maybe_get_admin_public_keys 2025-07-07 12:43:11 +02:00
DavHau
61edc1e06f Refactor StoreBase to take machine name string instead of Machine object
- Updated StoreBase.__init__ to accept machine: str and flake: Flake
- Modified all StoreBase subclasses (in_repo, vm, fs, sops, password_store) to match new signature
- Added select_machine method to Flake class for machine-specific attribute selection
- Updated Machine.select to use the new Flake.select_machine method
- Fixed all test cases to pass machine name and flake to store constructors
- Maintained backward compatibility by keeping the same external API

This reduces coupling between the store system and the Machine class,
making the architecture more modular and flexible.
2025-07-07 10:24:11 +00:00
Johannes Kirschbauer
c369f3b5d1 api/tasks: prefix impure actions with run 2025-07-07 12:09:43 +02:00
hsjobeki
0cc1f072f7 Merge pull request 'api/clan: rename 'show_clan_meta' -> 'get_clan_details'' (#4236) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4236
2025-07-07 10:00:10 +00:00
Johannes Kirschbauer
a2a011a47f machine/host: degrade into info and add docs 2025-07-07 11:52:46 +02:00
Brian McGee
e1796e19e4 feat(ui): refine Fieldset API 2025-07-07 10:51:43 +01:00
Johannes Kirschbauer
972adc7a7c api: chore rename outdated reference 2025-07-07 10:53:32 +02:00
Johannes Kirschbauer
e1b4f296e3 api: rename 'show_mdns' -> 'list_mdns_services' 2025-07-07 10:49:46 +02:00
Johannes Kirschbauer
1cb2156d87 api: rename to get_flash_options 2025-07-07 10:48:14 +02:00
Johannes Kirschbauer
84703fa293 docs: improve docstring for 'list_block_devices' 2025-07-07 10:46:26 +02:00
Johannes Kirschbauer
0e10122d54 api/clan: rename 'show_clan_meta' -> 'get_clan_details' 2025-07-07 10:41:00 +02:00
brianmcgee
ecd731024c Merge pull request 'feat(ui): alert component' (#4199) from ui/alerts into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4199
2025-07-07 08:11:13 +00:00
Jeremy Fleischman
e0da575201 Fix bug? member_id -> member_ip
(I stumbled across this while reading code, I haven't tested this at
all.)
2025-07-07 00:49:45 -07:00
Jeremy Fleischman
3577c689bd Add missing f to f-string 2025-07-07 00:48:32 -07:00
renovate[bot]
885103bfa4 chore(deps): lock file maintenance 2025-07-07 05:40:16 +00:00
Michael Hoang
afc1ca37bd Merge pull request 'cli: don't log every public key we find' (#4233) from push-lynrrnswopmw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4233
2025-07-07 05:38:03 +00:00
Michael Hoang
4aa536a1bf cli: don't log every public key we find 2025-07-07 15:23:46 +10:00
Michael Hoang
c61dfbf8dd Merge pull request 'treewide: don't generate SSH keys with builder hostname' (#4232) from push-suwrloyoqvlq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4232
2025-07-07 04:51:21 +00:00
Michael Hoang
e6785fa1d0 treewide: don't generate SSH keys with builder hostname 2025-07-07 14:39:57 +10:00
Michael Hoang
89ea01fd04 Merge pull request 'docs: misc improvements' (#4231) from push-xlwnnlrownnv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4231
2025-07-07 04:03:33 +00:00
Michael Hoang
a8a08e21e4 clanServices/sshd: add README 2025-07-07 13:54:26 +10:00
Michael Hoang
700f571598 docs: fix highlighting in code block 2025-07-07 13:54:26 +10:00
Michael Hoang
08c15b3d9b docs: remove colon from headings 2025-07-07 13:54:26 +10:00
lassulus
2848b6d5d6 Merge pull request 'vars password-store: fix secret mangling due to string encoding' (#4227) from pass-fix-bytes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4227
2025-07-07 00:50:58 +00:00
lassulus
ddc1059799 vars password-store: fix secret mangling due to string encoding 2025-07-07 02:35:17 +02:00
renovate[bot]
b690515dd7 Update data-mesher digest to a2166c1 2025-07-07 00:10:13 +00:00
lassulus
e9cef9c7c1 Merge pull request 'rename lingering clan.vars -> clan.core.vars' (#4224) from rip_clan_vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4224
2025-07-06 23:33:31 +00:00
lassulus
ca69864a20 rename lingering clan.vars -> clan.core.vars 2025-07-07 00:59:52 +02:00
hsjobeki
5436f284fb Merge pull request 'API: refactor into resource oriented names' (#4223) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4223
2025-07-06 19:11:31 +00:00
Johannes Kirschbauer
00df032635 vars/api: rename 'get_generators_closure' into 'get_machine_generators' 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
a2c016718a api/hardware: consolidate into 'describe_machine_hardware' 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
d1abebf068 api/inventory: remove 'inventory' from api entirely 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
9635fb03b7 api/flash: refactor into 'list_flash_options' 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
f48c596617 vars/api: rename, unregister some unused vars functions 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
0589c71601 Vars: rename public functions into 'create_machine_vars' 2025-07-06 20:57:42 +02:00
Johannes Kirschbauer
a2c2d73e49 Vars: rename 'keygen' to 'create_secrets_user' 2025-07-06 20:57:42 +02:00
hsjobeki
99b22dfcbf Merge pull request 'Templates/cli: move display command into it own category' (#4222) from clan-templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4222
2025-07-06 18:26:45 +00:00
Johannes Kirschbauer
cd04686663 Docs: update index 2025-07-06 20:06:17 +02:00
Johannes Kirschbauer
2b3e847c28 machine: rename standalone 'get_host' to 'get_machine_host' 2025-07-06 19:47:58 +02:00
Johannes Kirschbauer
d0ec4fd8e6 Templates/cli: move display command into it own category 2025-07-06 19:36:57 +02:00
hsjobeki
bb5c523ac8 Merge pull request 'Templates: remove InputPrio and related classes' (#4221) from clan-templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4221
2025-07-06 17:19:31 +00:00
Johannes Kirschbauer
4df4f5220b Templates: remove InputPrio and related classes 2025-07-06 19:08:45 +02:00
renovate[bot]
a082fd2ed9 Lock file maintenance 2025-07-06 15:00:31 +00:00
hsjobeki
3161c10aa8 Merge pull request 'templates_url: add clan template url test' (#4216) from clan-templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4216
2025-07-06 14:54:42 +00:00
Johannes Kirschbauer
7ad8ed1af0 Templates: fix invalid mock flake 2025-07-06 16:43:38 +02:00
Johannes Kirschbauer
94919dc9b8 Fix/ui: update create argument 2025-07-06 15:48:35 +02:00
Johannes Kirschbauer
1502cfa4a7 Templates: migrate clan templates to flake identifiers 2025-07-06 15:37:10 +02:00
Johannes Kirschbauer
cce0207225 Templates: remove outdated check for 'configuration.nix' in machine templates 2025-07-06 15:37:10 +02:00
Johannes Kirschbauer
38f98645ac Templates: replace leftover MachineID, by Machine 2025-07-06 15:37:10 +02:00
Johannes Kirschbauer
74d2ae0619 templates_url: add clan template url test 2025-07-06 15:37:10 +02:00
lassulus
c122201ff2 Merge pull request 'Revert "make host key check an enum instead of an literal type"' (#4220) from revert_host_key_check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4220
2025-07-06 13:19:00 +00:00
lassulus
e72795904d Revert "make host key check an enum instead of an literal type"
This reverts commit 543c518ed0.
2025-07-06 14:51:19 +02:00
hsjobeki
32ddb4ffa7 Merge pull request 'Templates/list: display templates via exposed nix value' (#4219) from templates-list into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4219
2025-07-06 12:49:58 +00:00
Johannes Kirschbauer
db6220b57b Templates/list: display templates via exposed nix value 2025-07-06 14:37:03 +02:00
lassulus
e929f36f80 Merge pull request 'vars/password-store: replace passBackend option with passPackage' (#4134) from lassulus/passage_compat into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4134
2025-07-06 11:44:27 +00:00
hsjobeki
f71460c4f9 Merge pull request 'clan-cli: fix incorrect field name in deploy warning messages. The warning for missing buildHost/targetHost always showed targetHost in the path, even when buildHost was the missing field.' (#4217) from pr-4215 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4217
2025-07-06 10:54:55 +00:00
lassulus
8302f3ffde vars/password-store: replace passBackend option with passPackage
The `clan.core.vars.settings.passBackend` option has been replaced with
`clan.vars.password-store.passPackage` to provide better type safety and
clearer configuration.

Changes:
- Remove problematic mkRemovedOptionModule that caused circular dependency
- Add proper option definition with assertion-based migration
- Users setting the old option get clear migration instructions
- Normal evaluation continues to work for users not using the old option

Migration: Replace `clan.core.vars.settings.passBackend = "passage"`
with `clan.vars.password-store.passPackage = pkgs.passage`
2025-07-06 12:46:39 +02:00
lassulus
bd82de6001 fix(flake): handle file paths with line numbers in cache existence check
The is_cached method now correctly handles store paths that have line
numbers appended (e.g., /nix/store/file.nix:123:456). Previously, these
paths would fail the existence check because the exact path with line
numbers doesn't exist as a file.

The fix adds a helper method that:
- First checks if the exact path exists
- If not, and the path contains colons, validates that the suffix
  consists only of numbers (line:column format)
- If valid, strips the line numbers and checks the base file path

This ensures that cached references to specific file locations are
properly validated while avoiding false positives with files that
have colons in their names.
2025-07-06 12:44:15 +02:00
adeci
06613de825 clan-cli: fix incorrect field name in deploy warning messages. The warning for missing buildHost/targetHost always showed targetHost in the path, even when buildHost was the missing field. 2025-07-06 12:44:02 +02:00
hsjobeki
76af63ee1c Merge pull request 'lib/get_host: improve abstraction, turn missconfiguration into a warning' (#4201) from cli-fixup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4201
2025-07-06 10:38:03 +00:00
Johannes Kirschbauer
3baa43fd87 cli/update: refactor machine selection logic into 'get_machines_for_update' 2025-07-06 12:27:28 +02:00
Johannes Kirschbauer
a6b8ca06ab machines/list: rename helper to instantiate_inventory_to_machines 2025-07-06 12:24:16 +02:00
Johannes Kirschbauer
f7faf2cd63 machines/list: remove duplicate query_machines_by_tags 2025-07-06 12:23:47 +02:00
Johannes Kirschbauer
bff3908bb1 CLI: update requireExplicitUpdate in help 2025-07-06 12:22:25 +02:00
Johannes Kirschbauer
d0613b4030 cli: return validated list from validate_machine_names 2025-07-06 12:22:00 +02:00
Johannes Kirschbauer
52b711667e lib/get_host: improve abstraction, turn missconfiguration into a warning
Motivation: A warning should encourage consistent usage of inventory.machines setting targetHost inside the machine should be considered a custom override

Changing the warning strings to avoid the term 'nix'/'json' both inventory and nixos machines are nix features
2025-07-06 12:08:00 +02:00
lassulus
13d6db98d1 Merge pull request 'better_select_output' (#4213) from better_select_output into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4213
2025-07-06 00:24:06 +00:00
lassulus
195134dd5e clan_cli: better select debug output 2025-07-06 01:17:55 +02:00
lassulus
0670f0ad32 clan_cli flake: remove apply from select, as it will break stuff in horrible ways
Since apply changes the structure of the retuned value, the cache will
be confused about the structure and in subsequent request will use this
wrong structure.

For example: we would use builtins.attrNames on inputs, the flake will
forever think that inputs is a list of strings and will report errors
whenever we try to fetch subkeys from it
2025-07-06 01:17:55 +02:00
lassulus
daf843eeab clan_cli run: add trace runOption to disable verbose traces in debug mode 2025-07-05 19:48:50 +02:00
lassulus
291b742fd7 Merge pull request 'clan_cli machines update: remove caching of sometimes missing pass config' (#4212) from fix_update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4212
2025-07-05 17:42:45 +00:00
lassulus
f7d6c23aaa clan_cli machines update: remove caching of sometimes missing pass config
This config value is not set if people don't use pass, it's also at the wrong location
We could cache it with a maybe, but we plan to move it anyway
2025-07-05 18:39:53 +02:00
DavHau
d143359a2d refactor: reduce coupling to Machine class in vars module
- Change Generator class to store machine name as string instead of Machine reference
- Update Generator.generators_from_flake() to only require machine name and flake
- Refactor check_vars() to accept machine name and flake instead of Machine object
- Create Machine instances only when needed for specific operations

This continues the effort to reduce dependencies on the Machine class,
making the codebase more modular and easier to refactor.
2025-07-05 16:30:05 +07:00
DavHau
448e60f866 refactor: remove Machine.vars_generators() method
Replace all calls to machine.vars_generators() with direct calls to
Generator.generators_from_flake() to make the dependency more explicit
and remove unnecessary indirection.

This reduces coupling to the Machine class, making the codebase more
modular and easier to refactor in the future.
2025-07-05 15:26:31 +07:00
renovate[bot]
324e934204 chore(deps): update disko digest to da6109c 2025-07-04 16:50:11 +00:00
Mic92
3f6e5968b5 Merge pull request 'Qubasa-hsjobeki/bump-nixpkgs' (#4205) from Qubasa-hsjobeki/bump-nixpkgs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4205
2025-07-04 16:47:23 +00:00
Jörg Thalheim
e4c8aba5bc zerotierone: disable tests on macos 2025-07-04 18:39:01 +02:00
Jörg Thalheim
76503b2a92 terminate_process_group: also properly yield iterator when we return early 2025-07-04 18:39:01 +02:00
Jörg Thalheim
d585052007 migrate all projects to python 3.13 linting 2025-07-04 18:39:01 +02:00
Jörg Thalheim
65904d8d8e clan-cli: handle None in union types to prevent TypeError
Add comprehensive test coverage for union types with None to prevent
regression of the issubclass() TypeError that was occurring when
checking if None is in a union type.
2025-07-04 18:39:01 +02:00
Jörg Thalheim
d5aa917ee7 migrate all projects to python 3.13 linting 2025-07-04 18:39:01 +02:00
Mic92
cb9284360f Merge pull request 'change install test to run clan outside of the VM' (#3906) from vm-test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3906
2025-07-04 15:17:14 +00:00
Qubasa
3f1fdc0aae treefmt/ruff: Set python lint version to 3.13. Fix all new lints coming up. 2025-07-04 17:11:31 +02:00
Johannes Kirschbauer
b35ca4f1a8 Chore: bump nixpkgs 2025-07-04 17:11:31 +02:00
Jörg Thalheim
76e653f37f nixoTestLib: split setting up function for port-forwarding and setuping up flake 2025-07-04 16:56:42 +02:00
Michael Hoang
10737f7d94 Merge pull request 'clanServices/wifi: fix autoConnect setting not doing anything' (#4204) from push-msokoouryrwq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4204
2025-07-04 14:33:49 +00:00
Michael Hoang
eb54fdc741 clanServices/wifi: fix autoConnect setting not doing anything 2025-07-05 00:05:48 +10:00
pinpox
4aa90f009f Merge pull request 'Re-introduce state-version option' (#4179) from state-version-option-again into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4179
2025-07-04 14:02:05 +00:00
Jörg Thalheim
247151e93f only override identify/host_key_check in a single place 2025-07-04 14:36:05 +02:00
Jörg Thalheim
543c518ed0 make host key check an enum instead of an literal type
this is more typesafe at runtime.
2025-07-04 14:36:05 +02:00
Jörg Thalheim
7f4f11751e nixosTestLib: use xargs for copying store inputs 2025-07-04 14:36:05 +02:00
Jörg Thalheim
a53efb9386 nixosTestLib: substitute dependencies on tools in 2025-07-04 14:36:05 +02:00
Jörg Thalheim
c509f333e4 nixosTestLib: fix various linting issues 2025-07-04 14:36:05 +02:00
Jörg Thalheim
ea93d8fec7 inline create_test_machine again 2025-07-04 14:36:05 +02:00
Jörg Thalheim
68b2aaea89 setup_nix_in_nix: use cp intead of shutil
it's faster and handles symlinks
2025-07-04 14:36:05 +02:00
Jörg Thalheim
1e7453ab04 move nixosTestLib to pkgs/testing 2025-07-04 14:36:05 +02:00
Jörg Thalheim
c148ece02e move setup_nix_in_nix into nixos_test_lib 2025-07-04 14:36:02 +02:00
Jörg Thalheim
b526242744 share more code between installation and update test 2025-07-04 14:14:28 +02:00
Jörg Thalheim
76b0a9bf13 add -i option to update-hardware-config 2025-07-04 14:14:28 +02:00
Jörg Thalheim
541732462b add port_utils module for installation testions 2025-07-04 14:14:28 +02:00
Jörg Thalheim
1558a366de bump clan-core-for-checks 2025-07-04 14:14:28 +02:00
Jörg Thalheim
6aab8ffd0c change install test to run clan outside of the VM 2025-07-04 14:14:28 +02:00
pinpox
ae9d219dea Merge branch 'main' into state-version-option-again 2025-07-04 11:56:15 +00:00
hsjobeki
899051a570 Merge pull request 'clan_lib/openapi: add openapi rendering' (#4200) from lib-openapi into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4200
2025-07-04 11:54:13 +00:00
hsjobeki
a44740d902 Merge pull request 'Clan_lib: add filtering by tag to list API' (#4197) from cli-fixup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4197
2025-07-04 11:53:43 +00:00
Johannes Kirschbauer
ba0397242f api: rename script to openapi.py 2025-07-04 13:40:59 +02:00
Luis Hebendanz
79560ac202 Merge pull request 'clan-app: Implement dynamic groups and array based filtering of logs and groups' (#4190) from Qubasa/clan-core:add_clan_group into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4190
2025-07-04 11:06:50 +00:00
Qubasa
52aaad272f clan-app: Implement dynamic log groups into javascript callApi
nix fmt
2025-07-04 17:49:00 +07:00
Johannes Kirschbauer
62c1db9769 Docs: init redoc internal rest inspired docs 2025-07-04 12:45:39 +02:00
Johannes Kirschbauer
b41029ea48 clan_lib/openapi: add openapi rendering 2025-07-04 12:09:16 +02:00
pinpox
a0a9cef2a6 Add state-version nixos option
This reverts commit 695574988e.
2025-07-04 11:54:12 +02:00
Brian McGee
1f26135381 feat(ui): alert component 2025-07-04 10:51:18 +01:00
brianmcgee
14b428216d Merge pull request 'ui/form-components' (#4118) from ui/form-components into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4118
2025-07-04 08:30:22 +00:00
Johannes Kirschbauer
91df5c258e lib/convert_inventory_to_machines: add classmethod for common conversion of Machine and InventoryMachine 2025-07-04 10:18:14 +02:00
Johannes Kirschbauer
fcb38820ec lib/get_host: improve abstraction, turn missconfiguration into a warning
Motivation: A warning should encourage consistent usage of inventory.machines setting targetHost inside the machine should be considered a custom override

Changing the warning strings to avoid the term 'nix'/'json' both inventory and nixos machines are nix features
2025-07-04 10:02:06 +02:00
Johannes Kirschbauer
6d85cc0ff2 Clan_lib: add filtering by tag to list API 2025-07-04 09:48:21 +02:00
Johannes Kirschbauer
10fbae0c15 cli: move some references to duplicate list machines 2025-07-04 09:32:43 +02:00
Qubasa
aef1edf8e3 clan_lib: Move load_in_all_api_functions to clan_lib 2025-07-04 14:22:40 +07:00
Qubasa
18735a150f clan_lib: Heavily simplified log_manager and test suite to concentrate on actually used features 2025-07-04 14:05:31 +07:00
Qubasa
c354a87765 clan_lib: Add better docstrings to log_manager 2025-07-04 13:35:34 +07:00
Qubasa
70d57cb267 clan_lib: expose log_manager with API.register properly 2025-07-04 13:19:09 +07:00
Qubasa
24b8cb799a clan-cli: Print function name to raise for unsupported types by API.register 2025-07-04 13:17:01 +07:00
renovate[bot]
68e61d66d7 chore(deps): update sops-nix digest to 3633fc4 2025-07-04 05:30:12 +00:00
DavHau
2e191d7db8 Merge pull request 'reverting 4c2bb0791d47c91130541333b296b2e8a39c4d08' (#4194) from davhau/dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4194
2025-07-04 03:51:22 +00:00
DavHau
969b7606a6 reverting 4c2bb0791d 2025-07-04 10:35:30 +07:00
Mic92
631d17b6e9 Merge pull request 'actually import state-version' (#4193) from fix-state-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4193
2025-07-03 18:32:15 +00:00
Jörg Thalheim
ba5b81abf0 actually import state-version 2025-07-03 20:19:19 +02:00
lassulus
1bcd2be478 Merge pull request 'refactor: remove _serialized field and implement efficient vars selection' (#4187) from remove_serialized into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4187
2025-07-03 17:18:27 +00:00
lassulus
a6409f921b refactor: remove _serialized field and implement efficient vars selection
- Remove _serialized field from vars interface to prevent serialization
  errors with throwing passBackend field
- Implement direct selection of generator fields using multi-select syntax
- Refactor vars_generators() to use new Generator.from_flake() method that
  selects only safe fields (avoiding non-serializable values)
- Remove unused legacy methods: Generator.from_json(), Var.from_json(),
  Prompt.from_json()
- Update precaching to match new selection approach

This fixes the serialization errors that were preventing vars from working
with the new password-store implementation by avoiding the problematic
_serialized field entirely.
2025-07-03 18:53:36 +02:00
lassulus
8f9d88a104 flake: prevent outPath in multiselect to avoid serialization issues
When using multiselect with outPath like {outPath,?meta}, nix evaluation
collapses the attrset to just the outPath string, breaking further selection.
Add validation during selector parsing to catch this and provide a clear error.
2025-07-03 18:53:36 +02:00
Brian McGee
9003204b54 fix(ui): disabled storybook derivation
Something about passing orientation in any of the Form stories is causing the browser to crash

`npm run test-storybook-static` works fine in the devshell.

Disabling for now as it's slowing down development.
2025-07-03 17:50:42 +01:00
Brian McGee
7939cfc9a9 feat(ui): flatten the Field pattern and introduce Orienter component 2025-07-03 17:50:41 +01:00
Brian McGee
7232892feb feat(ui): simplify timeout speedup for button stories 2025-07-03 17:50:40 +01:00
Brian McGee
c3ba72e82c feat(ui): Combobox component and style tooltip for label 2025-07-03 17:50:40 +01:00
Brian McGee
17b4f95055 feat(ui): simplify form components
Better pass through to the underlying Kobalte API without re-defining types.
2025-07-03 17:50:39 +01:00
Brian McGee
3c72ad1c92 fix(ui): hover and inverted colors for checkbox 2025-07-03 17:50:39 +01:00
Brian McGee
5b46136ca8 feat(ui): add fieldset component 2025-07-03 17:50:38 +01:00
Brian McGee
04c59c76ee feat(ui): add form field with text, textarea and checkbox support 2025-07-03 17:50:38 +01:00
hsjobeki
fbb93c8412 Merge pull request 'docs: update vpn setup instructions' (#4192) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4192
2025-07-03 14:32:13 +00:00
Johannes Kirschbauer
e0993559db docs: add zerotier debugging commands 2025-07-03 16:25:10 +02:00
Qubasa
76bba13a7f clan-app: Implement dynamic groups and array based filtering of logs and groups 2025-07-03 17:49:34 +07:00
hsjobeki
12c2c4ee89 Merge pull request 'inventory: fix missing default for instances.*.module' (#4189) from fix-inventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4189
2025-07-03 10:13:57 +00:00
Johannes Kirschbauer
f8d36634ee inventory: fix missing default for instances.*.module 2025-07-03 12:06:29 +02:00
Johannes Kirschbauer
b27ed51284 docs: update vpn setup instructions 2025-07-03 12:04:56 +02:00
Johannes Kirschbauer
a81701b59a docs: fix wrong roles assignment syntax 2025-07-03 11:42:26 +02:00
lassulus
609db2f00c Merge pull request 'refactor: remove deployment.json and use direct selectors' (#4142) from lassulus/remove-deployment-json into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4142
2025-07-02 19:13:39 +00:00
lassulus
40065c7a00 refactor: remove deployment.json and use direct selectors
- Remove deployment.json file generation from outputs.nix
- Add throw for deprecated deployment.file usage with upgrade instructions
- Remove vars data from deployment.data
- Update Machine class to use direct select() calls instead of deployment property
- Update all deployment property accesses to use direct selectors
- Add precaching for frequently accessed values in update.py:
  - Module paths for facts and vars
  - Deployment settings (requireExplicitUpdate, nixosMobileWorkaround)
  - Services and generators data
  - Secret upload locations
- This removes unnecessary JSON serialization and makes the code more composable
2025-07-02 20:56:23 +02:00
hsjobeki
2e4cbdc7c8 Merge pull request 'machines/update: queue update only for machines_to_update' (#4186) from cli-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4186
2025-07-02 17:16:12 +00:00
Johannes Kirschbauer
9aa7be3aba machines/update: queue update only for machines_to_update 2025-07-02 19:05:37 +02:00
hsjobeki
b2e8b8bf59 Merge pull request 'clan.deployment: unify deprecated options' (#4184) from cli-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4184
2025-07-02 16:48:19 +00:00
Johannes Kirschbauer
4c2bb0791d clan.deployment: unify deprecated option 2025-07-02 18:37:29 +02:00
hsjobeki
5cc8f3b2b3 Merge pull request 'docs/secrets: setup move plugins section to the bottom. Normal users don't have that, smart people read from bottom up' (#4185) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4185
2025-07-02 16:32:31 +00:00
Johannes Kirschbauer
fb5dca567e docs/secrets: setup move plugins section to the bottom. Normal users don't have that, smart people read from bottom up 2025-07-02 18:23:48 +02:00
Johannes Kirschbauer
97bdf49814 cli: fix listing maschines by their name 2025-07-02 18:18:48 +02:00
hsjobeki
b8feb652f6 Merge pull request 'docs/index: encourage non-linear flow' (#4183) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4183
2025-07-02 15:13:50 +00:00
Johannes Kirschbauer
58c9c929ba docs/index: add progress tracker, encourage non-linear flow 2025-07-02 17:02:16 +02:00
Johannes Kirschbauer
58862215ab docs: rephrase add machines for planned dynamic templates 2025-07-02 17:01:40 +02:00
Johannes Kirschbauer
667bbffb3f docs: add emojis to getting-started 2025-07-02 17:00:51 +02:00
hsjobeki
31b1725f6f Merge pull request 'docs: clarify project structure exploration in Getting Started' (#4182) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4182
2025-07-02 14:39:42 +00:00
Johannes Kirschbauer
0bd4074927 docs: clarify project structure exploration in Getting Started 2025-07-02 16:32:30 +02:00
hsjobeki
749a847d83 Merge pull request 'docs: remove step numbers' (#4181) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4181
2025-07-02 14:01:43 +00:00
Johannes Kirschbauer
faf6ac82eb docs: remove api reference build command 2025-07-02 15:53:48 +02:00
Johannes Kirschbauer
6c7beb7aaa docs: remove step numbers
Numerating steps is not informative and considered bad style
People tend to follow documentation non-linearly
leaving of at one point, starting over from the middle
Documentation should be written in a way that allow for that
2025-07-02 15:53:24 +02:00
Mic92
d7dcb55001 Merge pull request 'vars: make debug logging less verbose' (#4171) from merge-when-green-joerg into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4171
2025-07-02 11:48:59 +00:00
Luis Hebendanz
d3d337a51e Merge pull request 'clan-app: Init machine based API logging' (#4133) from Qubasa/clan-core:improve_ui_logs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4133
2025-07-02 11:30:22 +00:00
Qubasa
2fd6426f28 clan-app: whitelist necessary any usage in api./index.tsx 2025-07-02 18:11:28 +07:00
Jörg Thalheim
f70f6d6d80 clan_lib/test_create: fix test when running outside of the sandbox... 2025-07-02 13:04:46 +02:00
Qubasa
b9a386c881 clan-cli: api.py add python header 2025-07-02 17:59:24 +07:00
Qubasa
db3e8b9984 clan-app: Add logging middleware 2025-07-02 17:59:05 +07:00
hsjobeki
117224e6a4 Merge pull request 'pytest: improve logging a bit' (#4180) from pytest-logs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4180
2025-07-02 10:47:14 +00:00
Johannes Kirschbauer
ea77b48d83 pytest: improve logging a bit 2025-07-02 12:35:02 +02:00
Qubasa
5d99d0e1e7 clan-app: simplified task function, moved them to a separate file 2025-07-02 16:18:37 +07:00
Qubasa
1ec67ecfaf webview-lib: Moved repo to gitea, updated revision. Removed set_icon 2025-07-02 16:16:37 +07:00
Qubasa
d5064ce465 clan-app: Add pygdb.sh for debugging crashes in webview-lib 2025-07-02 16:00:55 +07:00
Qubasa
9080e7c7f6 clan-app: Fix .local.env not being sourced 2025-07-02 16:00:34 +07:00
Qubasa
8e00363584 ui-2d: Fix build errors 2025-07-02 15:59:50 +07:00
hsjobeki
672db4a33f Merge pull request 'clanServices: add flake level exports' (#4172) from flake-exports into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4172
2025-07-02 08:42:07 +00:00
Johannes Kirschbauer
82c80a9a53 clan/exportsModule: add missing default 2025-07-02 10:32:56 +02:00
Johannes Kirschbauer
16116505ab flake-exports: add options documentation 2025-07-02 10:22:09 +02:00
hsjobeki
80713f93af Merge pull request 'Revert "Merge pull request 'Make state-version generation an clan option' (#4056) from state-version-option into main"' (#4176) from revert-state-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4176
2025-07-02 07:37:37 +00:00
Johannes Kirschbauer
b6f00ed1f6 test: enable unsafe teardown of tempDir
aarch64 libc or kernel might be stricter in keeping files locked while they're open.
This causes failed teardown of the tmpdir
2025-07-02 09:27:05 +02:00
renovate[bot]
d6646ecc62 chore(deps): update data-mesher digest to 246f0d6 2025-07-02 00:20:19 +00:00
renovate[bot]
fc1c64985f chore(deps): update flake-parts digest to 7782624 2025-07-02 00:00:16 +00:00
Johannes Kirschbauer
695574988e Revert "Merge pull request 'Make state-version generation an clan option' (#4056) from state-version-option into main"
This reverts commit a101ff1f11, reversing
changes made to f12b62d8b4.
2025-07-01 18:15:11 +02:00
kenji
dc6648520f Merge pull request 'docs(clan): Improve state-version documentation' (#4174) from kenji/ke-state-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4174
2025-07-01 15:40:33 +00:00
Johannes Kirschbauer
454936336f clanServices: add test to ensure nixosModule is imported 2025-07-01 17:35:04 +02:00
a-kenji
0093836272 docs(clan): Improve state-version documentation 2025-07-01 17:32:20 +02:00
hsjobeki
e026ada443 Merge pull request 'clanServices: remove recursive services' (#4173) from revert-recursive-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4173
2025-07-01 15:11:57 +00:00
Johannes Kirschbauer
38bb2dfb56 clanServices: remove recursive services
Initially added in #3972 we've decided to remove them, because they are to complex to use correctly
2025-07-01 17:03:58 +02:00
Johannes Kirschbauer
d10fe7a8ee clanServices: add flake level exports 2025-07-01 16:54:19 +02:00
Jörg Thalheim
83b2fbc276 vars: make debug logging less verbose 2025-07-01 15:04:03 +02:00
hsjobeki
29a2103aab Merge pull request 'clanServices: clean up, add tests' (#4157) from default-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4157
2025-07-01 12:09:28 +00:00
hsjobeki
d858206fd2 Merge pull request 'Lib/flakes: remove self references' (#4165) from fix-lib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4165
2025-07-01 12:03:52 +00:00
Johannes Kirschbauer
c1bbd970d4 lib.clan: properly merge self attrs 2025-07-01 14:02:02 +02:00
Johannes Kirschbauer
5c7256e063 Lib/flakes: remove self references 2025-07-01 13:57:49 +02:00
Johannes Kirschbauer
8eb2ce1c40 tests: update buildClan args 2025-07-01 13:21:12 +02:00
Johannes Kirschbauer
93fc2e2238 modules/clan: inject .clan into self.inputs if self is an attribute set 2025-07-01 13:19:37 +02:00
Johannes Kirschbauer
a131c3cbbb checks: mock self.inputs.self by default 2025-07-01 13:19:37 +02:00
Johannes Kirschbauer
15f3cd5547 clanServices: add tests for resolve modules 2025-07-01 13:19:37 +02:00
Johannes Kirschbauer
15c5d539fc clanServices: remove unnecessary localModules 2025-07-01 13:19:37 +02:00
Johannes Kirschbauer
cf6fc744ab clanServices: remove unneeded self reference in lib 2025-07-01 13:19:37 +02:00
hsjobeki
0de362af58 Merge pull request 'clan_lib/tests: add big fat warning comment to save peoples time' (#4168) from test-1+ into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4168
2025-07-01 11:19:13 +00:00
Mic92
40d776b953 Merge pull request 'vars-check: replace slow python implementation with pure nix' (#4144) from machine-class into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4144
2025-07-01 10:53:27 +00:00
Jörg Thalheim
0a4bdf2e83 vars-check: replace slow python implementation with pure nix 2025-07-01 12:46:50 +02:00
Johannes Kirschbauer
df3abbad40 clan_lib/tests: add big fat warning comment to save peoples time 2025-07-01 12:30:17 +02:00
hsjobeki
e954d80dc6 Merge pull request 'buildClan: replace all usages by lib.clan' (#4167) from build-clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4167
2025-07-01 10:19:07 +00:00
Johannes Kirschbauer
ae274d6b82 buildClan: replace all usages by lib.clan 2025-07-01 11:56:31 +02:00
kenji
f97385a9dc Merge pull request 'checks/syncthing: Disable the syncthing check for now' (#4160) from kenji/ke-syncthing-disable-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4160
2025-07-01 09:23:40 +00:00
renovate[bot]
46ee232958 chore(deps): update nix-darwin digest to e04a388 2025-06-30 21:30:17 +00:00
a-kenji
bc4c6ef40a checks/syncthing: Disable the syncthing check for now
This particular check has been gotten quite slow over time,
as the upstream module has been updated.

This will be reintroduced in a more performant fashion, once the
`syncthing` module has been ported.
2025-06-30 17:47:31 +02:00
lassulus
64d22197c4 Merge pull request 'clanLib: remove select' (#4158) from fix-lib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4158
Reviewed-by: lassulus <clanlol@lassul.us>
2025-06-30 15:31:06 +00:00
brianmcgee
d2a4a5c2c4 Merge pull request 'feat(ui): use fake timer in tests and real timer in browser for storybook interaction tests' (#4159) from feat/storybook-fake-timers into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4159
2025-06-30 14:50:31 +00:00
Brian McGee
96b5ca9de0 feat(ui): use fake timer in tests and real timer in browser for storybook interaction tests
I believe the time-based tests are falsely failing when the CI machine is under high load. This also speeds up the tests in CI.

I'm not 100% happy with the approach, but this should resolve CI issues in the short term until I can improve things.
2025-06-30 15:19:57 +01:00
hsjobeki
847f8363f3 Merge pull request 'Docs: getting started add services' (#4156) from doc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4156
2025-06-30 14:16:00 +00:00
Johannes Kirschbauer
2ebeb2e205 clanLib: remove select 2025-06-30 16:14:01 +02:00
Johannes Kirschbauer
22778b1864 Docs: getting started add services 2025-06-30 15:14:47 +02:00
DavHau
8c323e25aa Merge pull request 'checks: introduce check.<system> for faster local checks' (#4155) from dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4155
2025-06-30 13:08:33 +00:00
DavHau
f02e2ce383 checks: introduce check.<system> for faster local checks
We haven many VM tests which are quite slow, therefore q local `nix flake check` doesn't make sense anymore in most cases.

This introduces a set of cheaper local tests to be run via:
```
nix run .#check.x86_64-linux -L
```
2025-06-30 19:55:25 +07:00
DavHau
1ab9eb733c checks: fix some tests not named correctly 2025-06-30 19:50:16 +07:00
DavHau
882ccbc4b8 checks: prefix all nixos tests with nixos-test- 2025-06-30 19:14:24 +07:00
DavHau
b448ff05e2 checks: rename dummy-inventory-test -> service-dummy-test 2025-06-30 19:06:13 +07:00
DavHau
ee5fa8fe74 checks: rename attributes for better discoverability
- all eval checks prefixed with `eval-`
- all service checks prefixed with `service-`
2025-06-30 19:04:21 +07:00
hsjobeki
5f7c55c93f Merge pull request 'docs: move deployment docs from add machine to deploy' (#4153) from doc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4153
2025-06-30 11:50:35 +00:00
DavHau
8de7a9f040 services: improve error when module not found 2025-06-30 11:44:30 +00:00
DavHau
a101ff1f11 Merge pull request 'Make state-version generation an clan option' (#4056) from state-version-option into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4056
2025-06-30 11:24:42 +00:00
Johannes Kirschbauer
4f55af9026 Docs: rename installer to usb installer 2025-06-30 13:03:07 +02:00
Johannes Kirschbauer
2fbfda504a docs: move deployment docs from add machine to deploy 2025-06-30 13:02:57 +02:00
Johannes Kirschbauer
642b300ce8 docs: mark getting-started/flash installer as optional" 2025-06-30 13:02:46 +02:00
pinpox
9e7e0378a8 Remove state-version module from tests 2025-06-30 12:58:05 +02:00
pinpox
47d4dfad1b Add state-version option 2025-06-30 12:54:29 +02:00
pinpox
77bc1c75dd Remove state-version module and service 2025-06-30 12:54:29 +02:00
DavHau
f12b62d8b4 docs: explain about simplified way of specifying instances 2025-06-30 10:27:37 +00:00
pinpox
66a5fc988e Merge pull request 'Add example for users service' (#4150) from doc-users into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4150
2025-06-30 10:25:51 +00:00
DavHau
abdc8913f3 Merge pull request 'clan services: use clan-core as a default source for services' (#4147) from davhau/dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4147
2025-06-30 10:13:46 +00:00
DavHau
e0b2d15361 tests: explicitly specify services to be sourced from self
See previous commit
2025-06-30 10:13:46 +00:00
DavHau
50cce90527 clan services: use service modules from clan-core by default
Users will use clan-core services first before making their own. Therefore this is a better default. Also it allow us to simplify rendering of our docs
2025-06-30 10:13:46 +00:00
pinpox
1d25458390 Add example 2025-06-30 12:09:29 +02:00
renovate[bot]
ae2b9313bd chore(deps): update nix-darwin digest to 425c929 2025-06-30 09:00:18 +00:00
renovate[bot]
eb2e7db202 chore(deps): update data-mesher digest to 97d8e88 2025-06-30 00:20:20 +00:00
Mic92
f7a7c8df85 Merge pull request 'Fix darwin support again' (#4143) from machine-class into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4143
2025-06-29 22:08:52 +00:00
Jörg Thalheim
f1fd710dd1 add regression test for macOS evaluation 2025-06-29 23:58:19 +02:00
Jörg Thalheim
622597e70f overridePkgs: drop unneeded parantheses 2025-06-29 23:58:19 +02:00
Jörg Thalheim
b415e063f1 darwinConfigurations/darwinModules: export with right _file attributes 2025-06-29 23:58:19 +02:00
Jörg Thalheim
43b205624d no longer fallback to "nixos" machineClass
we should always have a value defined.
2025-06-29 23:58:19 +02:00
lassulus
acf673216b Merge pull request 'refactor: replace eval_nix/build_nix with machine.select()' (#4139) from lassulus/refactor-machine-select-clean into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4139
2025-06-29 16:57:27 +00:00
lassulus
286c75a142 refactor: replace eval_nix/build_nix with machine.select()
- Remove nix(), eval_nix(), and build_nix() methods from Machine class
- Add select() method that handles machine-specific attribute prefixes
- Update all usages to use machine.select() directly
- Handle Path conversion and tmp_store logic at call sites
- This simplifies the Machine API and prepares for deployment.json removal
2025-06-29 17:00:27 +02:00
Luis Hebendanz
b51dddaffc Merge pull request 'revert_templates' (#4132) from Qubasa/clan-core:revert_templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4132
2025-06-28 15:55:45 +00:00
Qubasa
d542c87639 Revert "add flakeparts to template test"
This reverts commit c2d0a19ed4.
2025-06-28 22:43:34 +07:00
Qubasa
3cb250d5a4 Revert "Update new-clan template"
This reverts commit c2d8cdf7f1.
2025-06-28 22:42:46 +07:00
Qubasa
3a772a5f56 Revert "Cleanup templates"
This reverts commit a3a81a959a.
2025-06-28 22:42:39 +07:00
Qubasa
277ef4f946 Revert "templates/minimal: consistent input names"
This reverts commit c847766f9e.
2025-06-28 22:42:20 +07:00
Qubasa
99d3e4ec11 Revert "tests/create_clan: bring back read,write checks"
This reverts commit 7f6684998b.
2025-06-28 22:42:11 +07:00
Qubasa
46bc5b519a Revert "templates/minimal: reuse flake-parts from clan-core"
This reverts commit 03b5c6de02.
2025-06-28 22:41:45 +07:00
Qubasa
b14357a4e0 Revert "templates: fix tests"
This reverts commit 7ce29938e9.
2025-06-28 22:41:31 +07:00
Qubasa
ba19aa8810 Revert "templates: remove .clan-flake"
This reverts commit bf377bd4e0.
2025-06-28 22:40:55 +07:00
Mic92
59dc49f606 Merge pull request 'drop more dependencies from pytest' (#4131) from speed-up-vars-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4131
2025-06-28 07:42:01 +00:00
Jörg Thalheim
2a4e11407b drop more dependencies from pytest 2025-06-28 09:27:34 +02:00
Mic92
24fcc9a647 Merge pull request 'don't keep appending --impure to nix_options when running tests' (#4128) from speed-up-flake-select into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4128
2025-06-28 07:26:16 +00:00
Jörg Thalheim
d7fffa68d5 consolidate clan-lib/clan-cli pytest into one test derivation
Than we can re-use test pytest worker better and it's less complex.
2025-06-28 09:11:14 +02:00
Jörg Thalheim
6f29745ab4 drop virtviwer from testRuntimeDependencies 2025-06-28 09:11:14 +02:00
Jörg Thalheim
f28b5a4760 generate-test-vars: fix entrypoint 2025-06-28 08:50:41 +02:00
Jörg Thalheim
43df2c9a14 fix unlocked flake.lock in tests 2025-06-28 08:50:41 +02:00
hsjobeki
8122158da7 Merge pull request 'machines/create: fix handle defaults' (#4129) from update-templates-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4129
2025-06-27 18:59:39 +00:00
Johannes Kirschbauer
2b0d7e345f machines/create: fix handle defaults 2025-06-27 20:28:11 +02:00
Jörg Thalheim
65ee951b72 select: drop unused --impure flag 2025-06-27 19:30:45 +02:00
Jörg Thalheim
b251275063 select: use nix_options copy 2025-06-27 19:30:45 +02:00
Jörg Thalheim
6afe4305b4 select: drop unused nixpkgs fallback 2025-06-27 19:30:45 +02:00
hsjobeki
8a7daddad4 Merge pull request 'Update clan templates' (#4099) from update-templates-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4099
2025-06-27 17:25:22 +00:00
Johannes Kirschbauer
bf377bd4e0 templates: remove .clan-flake 2025-06-27 19:14:21 +02:00
Johannes Kirschbauer
7ce29938e9 templates: fix tests 2025-06-27 19:14:21 +02:00
Mic92
7d6f12fb57 Merge pull request 'pkgs/clan: Fix clan ssh subcommand' (#4124) from mic92/kenji/ke-fix-ssh-deploy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4124
2025-06-27 16:57:07 +00:00
Jörg Thalheim
553d13b05a don't keep appending --impure to nix_options when running tests 2025-06-27 18:54:13 +02:00
Mic92
8722f2fa52 Merge pull request 'Add restricted network nixos modules' (#4125) from speed-up-flake-select into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4125
2025-06-27 16:52:51 +00:00
Jörg Thalheim
6ab5171b5b add restricted network nixos modules
See README.md for explanation
2025-06-27 18:44:17 +02:00
Jörg Thalheim
e152740017 container-test-driver: implement wait_for_open_port 2025-06-27 18:35:55 +02:00
Jörg Thalheim
bc3ba8eeff markdown: ignore trailing whitespace 2025-06-27 16:26:39 +02:00
Johannes Kirschbauer
03b5c6de02 templates/minimal: reuse flake-parts from clan-core 2025-06-27 16:11:37 +02:00
a-kenji
6a911c97a3 pkgs/clan: Fix clan ssh subcommand 2025-06-27 15:39:38 +02:00
Mic92
5d5bb32970 Merge pull request 'select: disable remote building and substitution' (#4123) from speed-up-flake-select into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4123
2025-06-27 12:00:18 +00:00
Jörg Thalheim
3035752d00 select: disable remote building and substitution
this should make things faster since the derivation itself is trivial.
2025-06-27 13:37:16 +02:00
kenji
0799c72095 Merge pull request 'modules/zerotier: Fix typo in documentation' (#4121) from kenji/ke-fix-zerotier-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4121
2025-06-27 11:24:28 +00:00
kenji
b5ef05f9ad Merge pull request 'modules/users: Fix the password deployment' (#4113) from kenji/ke-fix-user-password-service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4113
2025-06-27 11:20:59 +00:00
kenji
a624cb34ee Merge pull request 'pkgs/clan: Add machine validator with suggestion logic' (#4112) from ke-machines-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4112
2025-06-27 11:09:05 +00:00
a-kenji
c0d4db6a8d modules/zerotier: Fix typo in documentation 2025-06-27 12:58:59 +02:00
kenji
a88f3e21a6 Merge pull request 'pkgs/clan: Improve error message on clan secrets users add' (#4095) from kenji/ke-clan-age-key-error into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4095
Reviewed-by: brianmcgee <brian@bmcgee.ie>
2025-06-27 10:52:16 +00:00
a-kenji
e248b1f551 modules/users: Fix the password deployment
The password needs to be available prior to logging in,
this is why we need to set `neededFor = users`.
2025-06-27 12:48:15 +02:00
kenji
89e8673e82 Merge pull request 'lib/test/sops: Fix secret deployment for test machines' (#4120) from kenji/ke-fix-sops-test-integration into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4120
2025-06-27 10:45:41 +00:00
a-kenji
3e70e30b6b pkgs/clan: Add machine validator with suggestion logic
Add machine validator with suggestion logic to:
- `clan machines update`
- `clan machines delete`
- `clan machines update-hardware-config`
2025-06-27 12:32:36 +02:00
a-kenji
0a56f60005 lib/test/sops: Fix secret deployment for test machines
Fix secret deployment for test machines in our NixOS vm and container
tests.

We filter now if we really need to deploy a certain set of files as a
deployment script, which alleviates us running into these edgecases:
```
error: The option `nodes.server.system.activationScripts.setupSecrets.text'
was accessed but has no value defined. Try setting the option.
```
2025-06-27 12:19:46 +02:00
Johannes Kirschbauer
7f6684998b tests/create_clan: bring back read,write checks 2025-06-27 11:04:31 +02:00
Johannes Kirschbauer
c847766f9e templates/minimal: consistent input names 2025-06-27 11:04:31 +02:00
pinpox
c2d0a19ed4 add flakeparts to template test 2025-06-27 11:04:31 +02:00
pinpox
a3a81a959a Cleanup templates 2025-06-27 10:39:59 +02:00
pinpox
c2d8cdf7f1 Update new-clan template 2025-06-27 10:39:59 +02:00
hsjobeki
9de5b97802 Merge pull request 'modules/clan: consistent logic for auto injecting nixpkgs, nix-darwin' (#4117) from hsjobeki/fix-clan.nix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4117
2025-06-27 08:35:01 +00:00
Johannes Kirschbauer
8789ebeb59 modules/clan: consistent logic for auto injecting nixpkgs, nix-darwin
We want to make them options this is a temporary fix
2025-06-27 10:23:53 +02:00
hsjobeki
6f1a5286db Merge pull request 'Fix(clan-module): pass clan-core not a module' (#4116) from hsjobeki/fix-clan.nix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4116
2025-06-27 08:21:44 +00:00
Johannes Kirschbauer
7372063579 Fix(clan-module): pass clan-core not a module 2025-06-27 10:13:58 +02:00
hsjobeki
c3c9a8d082 Merge pull request 'modules: add explizit class to clan module' (#4115) from hsjobeki/buildClan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4115
2025-06-27 08:13:54 +00:00
Johannes Kirschbauer
d011b1ab02 docs: rename all references from 'buildClan' to 'lib.clan' 2025-06-27 09:54:23 +02:00
Johannes Kirschbauer
b34e5b30e5 modules: add explizit class to clan module 2025-06-27 09:53:40 +02:00
hsjobeki
b1376f2669 Merge pull request 'buildClan: deprecate in favor of 'clan'' (#4111) from hsjobeki/buildClan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4111
2025-06-27 07:29:32 +00:00
Johannes Kirschbauer
79ec0f07eb modules: fix consistent nixpkgs and nix-darwin injection 2025-06-27 09:21:19 +02:00
Johannes Kirschbauer
7833a56723 modules.nixosVmTest: rename to nixosTest to match the target module _class 2025-06-26 17:37:42 +02:00
Johannes Kirschbauer
50f6b4a095 modules.clan.default: move specialArgs into common place 2025-06-26 17:37:42 +02:00
Johannes Kirschbauer
e195a77476 buildClan: deprecate in favor of 'clan'
clan.lib.clan { <your definition> } returns an eval result
In contrast to buildClan which returns the .config
This allows for better introspection
2025-06-26 17:08:47 +02:00
Johannes Kirschbauer
0271af0dcb modules: move clan module to flake.modules.clan.default 2025-06-26 17:08:47 +02:00
Johannes Kirschbauer
cfce6d9845 flake-parts: enable modules feature 2025-06-26 17:08:47 +02:00
hsjobeki
6929700c77 Merge pull request 'chore: clean up logic around clanInternals' (#4110) from hsjobeki/buildClan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4110
2025-06-26 14:21:59 +00:00
Johannes Kirschbauer
7d755d04b5 chore: clean up logic around clanInternals 2025-06-26 16:12:35 +02:00
pinpox
4f8421def0 Merge pull request 'Fix machine-id on macos' (#4109) from fix-mac-machine-id into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4109
2025-06-26 13:57:19 +00:00
hsjobeki
0cabce6e5f Merge pull request 'chore: buildClan warn access without .config prefix' (#4108) from hsjobeki/buildClan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4108
2025-06-26 13:39:39 +00:00
pinpox
264b010a89 Fix machine-id on macos 2025-06-26 15:35:34 +02:00
hsjobeki
28147fb5d5 Merge pull request 'refactor: unify evalClanService with evalService' (#4106) from hsjobeki/eval service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4106
2025-06-26 13:22:03 +00:00
Johannes Kirschbauer
a95d39923e chore: buildClan warn access without .config prefix
Makes behavior consistent with nixosSystem, nixpkgs.
Alows access to options and other eval modules results
Needed for error tracking and better devx
2025-06-26 15:21:49 +02:00
Johannes Kirschbauer
acaf44e2c5 chore: remove spurious class 2025-06-26 15:20:18 +02:00
Johannes Kirschbauer
e77769bd20 refactor: clanLib buildClan 2025-06-26 15:20:05 +02:00
Johannes Kirschbauer
11a94893fb refactor: unify evalClanService with evalService 2025-06-26 14:50:35 +02:00
hsjobeki
c079d6b65f Merge pull request 'refactor: simplify buildClan remove any filtering' (#4105) from hsjobeki/buildClan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4105
2025-06-26 12:04:37 +00:00
Johannes Kirschbauer
1568950410 refactor: simplify buildClan remove any filtering 2025-06-26 13:56:14 +02:00
hsjobeki
5ae6636126 Merge pull request 'refactor: clan expose the clan module as is' (#4101) from hsjobeki/clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4101
2025-06-26 11:44:24 +00:00
Johannes Kirschbauer
6c460db016 schema: update clan option source 2025-06-26 13:24:34 +02:00
renovate[bot]
47b338f539 Update data-mesher digest to 32b1ff6 2025-06-26 10:50:17 +00:00
renovate[bot]
f314fbb1b9 Update treefmt-nix digest to ac8e6f3 2025-06-26 10:30:17 +00:00
Johannes Kirschbauer
9196de993d feat(darwinModules): add module location analog to flake-parts 2025-06-26 11:55:55 +02:00
Johannes Kirschbauer
fcd2124936 refactor: clan expose the clan module as is 2025-06-26 11:47:53 +02:00
hsjobeki
06711a09c5 Merge pull request 'inventory.json: remove all services from local inventory' (#4100) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4100
2025-06-26 09:45:04 +00:00
Johannes Kirschbauer
2f5793a2bc inventory.json: remove all services from local inventory 2025-06-26 11:28:33 +02:00
hsjobeki
76e8cf10cb Merge pull request 'Refactor(build-inventory): remove build-inventory in favor of simple and expressive evalModules' (#4097) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4097
2025-06-26 09:27:55 +00:00
Johannes Kirschbauer
a01ece8742 Refactor(build-inventory): remove build-inventory in favor of simple and expressive evalModules 2025-06-26 11:11:50 +02:00
pinpox
a37bdd9fac Merge pull request 'Add deprecation warnings to all clanModules' (#4098) from all-deprecations into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4098
2025-06-26 08:43:55 +00:00
pinpox
0b459f64e6 Add deprecation warnings to all clanModules 2025-06-26 10:35:47 +02:00
renovate[bot]
e09deaf42c Update disko digest to 83c4da2 2025-06-26 02:50:17 +00:00
hsjobeki
4ea7a10a79 Merge pull request 'importer: Fix the documentation for the importer service' (#4062) from kenji/importer: Fix the documentation for the importer service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4062
Reviewed-by: hsjobeki <hsjobeki@gmail.com>
2025-06-25 16:30:04 +00:00
hsjobeki
1955a8171e Merge pull request 'build-inventory: refactor into seperate folders and explizit submodule' (#4094) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4094
2025-06-25 16:23:58 +00:00
Johannes Kirschbauer
0bb5ed923e build-inventory: fix tests temporarily 2025-06-25 18:15:47 +02:00
Johannes Kirschbauer
c91b5fb3db build-inventory: move inventory and inventoryClass into explizitly different folders 2025-06-25 17:55:45 +02:00
a-kenji
6188583885 pkgs/clan: Improve error message on clan secrets users add
Improve error message on `clan secrets users add [user] --age-key
`AGE-PLUGIN-YUBIKEY`

Since there is no way to get the recipient through the AGE-PLUGIN-YUBIKEY,
we should fail fast and give an actionable error to the user.
2025-06-25 17:30:59 +02:00
Johannes Kirschbauer
68ed393c87 build-inventory: replace by equivalent submodule 2025-06-25 17:23:46 +02:00
hsjobeki
af27f43491 Merge pull request 'inventory/interface: reduce apply arguments chain by adding options' (#4092) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4092
2025-06-25 14:41:55 +00:00
Johannes Kirschbauer
16392622c5 Chore: add _file for internals error tracing 2025-06-25 15:47:18 +02:00
Johannes Kirschbauer
1819243123 inventory/interface: reduce apply arguments chain by adding it to _module.args 2025-06-25 15:15:22 +02:00
kenji
4204381edc Merge pull request 'pkgs/agit: Pre-fill the editor with commit messages' (#4083) from kenji/pkgs/agit: Pre-fill the editor with commit messages into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4083
2025-06-25 10:52:22 +00:00
kenji
4e35ab2e47 Merge pull request 'pkgs/agit: Autofill AGit topic based on the current branch name' (#4091) from kenji/ke-topic-name-from-branch into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4091
2025-06-25 10:47:44 +00:00
a-kenji
332f844ec6 pkgs/agit: Autofill AGit topic based on the current branch name
This makes it more likely that AGit topics are compatible with git
commands.
2025-06-25 12:32:32 +02:00
hsjobeki
a4bcaa8854 Merge pull request 'build-clan: always use a single entry point' (#4089) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4089
2025-06-25 10:28:50 +00:00
Johannes Kirschbauer
d0ae75e5cc build-clan: export default.nix that injects clanLib
This should be the single entry point, that includes clanLib
instead of importApply propagation
2025-06-25 12:07:59 +02:00
kenji
ed7162635b Merge pull request 'pkgs/clan-cli: Fix typo in sshd test' (#4088) from kenji/pkgs/clan-cli: Fix typo in sshd test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4088
2025-06-25 10:00:06 +00:00
Johannes Kirschbauer
aa96a11369 build-clan: move clan attribute relates modules into subfolder 2025-06-25 10:55:37 +02:00
hsjobeki
3e030a5199 Merge pull request 'build-clan: move clan attribute relates modules into subfolder' (#4063) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4063
2025-06-25 08:46:18 +00:00
a-kenji
b14a15407c pkgs/clan-cli: Fix typo in sshd test 2025-06-25 10:13:06 +02:00
DavHau
d1163bc2c5 Merge pull request 'docs: add clan options search page' (#4077) from davhau/docs: add clan options search page into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4077
2025-06-25 06:56:55 +00:00
DavHau
75ce3fcb84 nuschtos: fix flake dependencies crashing tests 2025-06-25 13:48:50 +07:00
DavHau
9299c83822 bring back services rendering for docs
Setting services to visible = false breaks stuff
2025-06-25 13:48:50 +07:00
DavHau
2b73671f18 docs/devshell: unbreak - add options-page
Create the options-page subpage when the docs dev shell is loaded.

Also simplify the dev shell definition by just utilizing what's in configurePhase of the docs derivation
2025-06-25 13:48:50 +07:00
DavHau
4421ce006e docs: add clan options search page
This provides a simpler and more intuitive search over a flat list of possible options.

Styling still to be improved
2025-06-25 12:55:25 +07:00
DavHau
ae1a139818 nix_modules: generate clan.py in top-level shell
Generally I don't think dev shells are the right place to trigger generation of files.
This should be part of the formatter and pre-commit hook

@hsjobeki
2025-06-25 12:33:36 +07:00
a-kenji
c6dce03c58 pkgs/agit: Pre-fill the editor with commit messages
Pre-fill the editor with commit messages for the AGit PR.
2025-06-25 01:56:46 +02:00
Luis Hebendanz
b1dcef4862 Merge pull request 'clan-app: Add a 'group' to log_manager. Move log_manager to own subdirectory' (#4081) from Qubasa/clan-core:improve_ui_logs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4081
2025-06-24 19:53:09 +00:00
Qubasa
6558a915ad clan-app: Add a 'group' to log_manager. Move log_manager to own subdirectory 2025-06-24 21:42:18 +02:00
kenji
92918719e9 Merge pull request 'pkgs/agit: Document agit PR fetching' (#4080) from kenji/pkgs/agit: Document agit PR fetching into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4080
2025-06-24 17:21:34 +00:00
Luis Hebendanz
81b87a6437 Merge pull request 'clan-lib: Move nix_options from Machine class to Flake class' (#4048) from Qubasa/clan-core:move_nix_options into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4048
Reviewed-by: lassulus <clanlol@lassul.us>
2025-06-24 17:19:16 +00:00
kenji
96cf48a8a8 Merge pull request 'pkgs/agit: Add proper closing message for aborting an AGit PR' (#4076) from kenji/pkgs/agit: Add proper closing message for aborting an AGit PR into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4076
2025-06-24 17:18:00 +00:00
a-kenji
6831dc9f72 pkgs/agit: Document agit PR fetching 2025-06-24 19:13:04 +02:00
Qubasa
60d2837ddd clan-cli: Remove unecessary nix_options args from functions 2025-06-24 19:07:41 +02:00
Qubasa
1bec31b371 generate-test-vars: Fix wrong Flake function invocations 2025-06-24 19:03:20 +02:00
Qubasa
5c6c848dea formatter.iix: Add generate-test-vars to be typechecked 2025-06-24 19:03:20 +02:00
Qubasa
d14a5d34fd clan-lib: Move nix_options from Machine class to Flake class 2025-06-24 19:03:20 +02:00
Luis Hebendanz
d3d2cb8723 Merge pull request 'Move update.py to clan_lib/machines part 4' (#4073) from Qubasa/clan-core:move_to_clan_lib6 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4073
2025-06-24 14:52:10 +00:00
Luis Hebendanz
e6a7efafcf Merge pull request 'Move delete.py to clan_lib/machines part 3' (#4069) from Qubasa/clan-core:move_to_clan_lib5 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4069
2025-06-24 14:51:19 +00:00
Luis Hebendanz
ef5a4ab122 Merge pull request 'Move list.py to clan_lib/machines part 2' (#4068) from Qubasa/clan-core:move_to_clan_lib4 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4068
2025-06-24 14:51:06 +00:00
a-kenji
c8e6a6c6b8 pkgs/agit: Add proper closing message for aborting an AGit PR
Add a proper closing message for aborting an AGit PR.
Also add documentation directly to the comments of the COMMIT_EDITMSG.
2025-06-24 16:47:10 +02:00
renovate[bot]
bbebf67eb0 Update dependency vite to v7 2025-06-24 13:10:33 +00:00
pinpox
724aa17faa Merge pull request 'Make machine ID a option' (#4013) from machine-id-option into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4013
2025-06-24 12:13:22 +00:00
Johannes Kirschbauer
9fcbb6d688 build-clan: move clan attribute relates modules into subfolder 2025-06-24 13:13:59 +02:00
pinpox
b53975684e Merge branch 'main' into machine-id-option 2025-06-24 11:12:24 +00:00
kenji
a1b1f3e9de Merge pull request 'pkgs/agit: Add all commits since main to edit comment' (#4071) from kenji/pkgs/agit: Add all commits since main to edit comment into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4071
2025-06-24 11:01:15 +00:00
a-kenji
d4a4f61f74 pkgs/agit: Add all commits since main to edit comment
This is a first step for adding all the commits to the `agit c` and
prefilling it.
2025-06-24 12:18:15 +02:00
Qubasa
e79b926566 clan-cli: Move update.py to clan_lib/machines 2025-06-24 12:17:21 +02:00
Qubasa
d85277a077 clan-vm-manager: Fix list_machines import 2025-06-24 12:16:38 +02:00
Qubasa
29a5fbed53 clan-cli: Move delete.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
Qubasa
e53a490edc clan-cli: Move list.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
Qubasa
48ea1c757f clan-cli: Move morph.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
renovate[bot]
f81c2254e1 Update dependency tailwindcss to v4 2025-06-24 10:10:27 +00:00
DavHau
03fe06285b inventory interface: add description for module.name 2025-06-24 10:09:05 +00:00
pinpox
b476eb2f92 Merge branch 'main' into machine-id-option 2025-06-24 10:08:04 +00:00
Qubasa
ae73428ba5 clan-vm-manager: Fix list_machines import 2025-06-24 12:03:56 +02:00
Qubasa
ca17fb0ee8 clan-cli: Move list.py to clan_lib/machines 2025-06-24 11:57:02 +02:00
kenji
f288b8c1ef Merge pull request 'pkgs/clan: Add --tags support to clan machines update' (#4061) from kenji/pkgs/clan: Add --tags support to clan machines update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4061
2025-06-24 09:43:35 +00:00
pinpox
62199e5ec9 Merge branch 'main' into machine-id-option 2025-06-24 09:41:42 +00:00
Qubasa
add15a1a3e clan-cli: Move delete.py to clan_lib/machines 2025-06-24 11:37:21 +02:00
Qubasa
5a14bd3993 clan-cli: Move list.py to clan_lib/machines 2025-06-24 11:32:42 +02:00
Qubasa
eb26ccaed0 clan-cli: Move morph.py to clan_lib/machines 2025-06-24 11:24:38 +02:00
Luis Hebendanz
1b6a3ba335 Merge pull request 'clan-cli: Move hardware.py to clan_lib/machines part2' (#4066) from Qubasa/clan-core:move_to_clan_lib2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4066
2025-06-24 09:19:41 +00:00
Luis Hebendanz
18d45da9d6 Merge pull request 'clan-cli: Add missining propagation of host-key-check in machines.update' (#4053) from Qubasa/clan-core:fix_host_key_check_in_update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4053
2025-06-24 09:10:30 +00:00
Qubasa
b26aad3619 clan-cli: Move hardware.py to clan_lib/machines 2025-06-24 11:07:37 +02:00
pinpox
cb69eea68f Make machine ID a option 2025-06-24 10:42:03 +02:00
Qubasa
7eb90acfc4 clan-cli: Add missining propagation of host-key-check in machines.update 2025-06-24 10:35:53 +02:00
brianmcgee
26a2b45c74 Merge pull request 'add Tag and TagGroup components' (#4038) from ui/tags into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4038
2025-06-24 08:30:06 +00:00
a-kenji
5b04cfc06a pkgs/clan: Add --tags support to clan machines update 2025-06-23 23:51:43 +02:00
a-kenji
e0b7b3329a importer: Fix the documentation for the importer service 2025-06-23 23:27:37 +02:00
hsjobeki
afc001cc54 Merge pull request 'pkgs/clan-cli: Remove confusing note from the CLI help' (#4045) from kenji/pkgs/clan-cli: Remove confusing note from the CLI help into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4045
2025-06-23 14:22:28 +00:00
hsjobeki
a6f94987f9 Merge pull request 'Feat(inventory): simplify instance module spec, by applying a default' (#4054) from hsjobeki/module-default into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4054
2025-06-23 14:21:55 +00:00
hsjobeki
f0d8974d03 Merge pull request 'Refactor(build-clan): rename to lib/modules' (#4055) from clan-unify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4055
2025-06-23 14:16:54 +00:00
Johannes Kirschbauer
5dc80e43cd Chore(classes): update classes 2025-06-23 16:11:12 +02:00
Johannes Kirschbauer
247eb46b5e Refactor(build-clan): rename to lib/modules
This is a preparation for moving everything into clan, to make it all one module evaluation
2025-06-23 16:06:49 +02:00
Luis Hebendanz
fa843569c7 Merge pull request 'Simplify parse_deployment_address function' (#4052) from Qubasa/clan-core:simplify_parse_deployment_address into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4052
2025-06-23 13:51:37 +00:00
Johannes Kirschbauer
c37651f2fe Feat(inventory): simplify instance module spec, by applying a default 2025-06-23 15:46:52 +02:00
Qubasa
046d13bd50 clan-lib: Rename parse_deployment_address to parse_ssh_uri 2025-06-23 15:32:35 +02:00
Qubasa
c3a631de7e clan-lib: Remove override args from parse_deployment_address, instead use the Remote.override method where necessary 2025-06-23 15:28:22 +02:00
Luis Hebendanz
b3c04ccd53 Merge pull request 'Simplify handling of HostKeyCheck' (#4051) from Qubasa/clan-core:make_host_key_check_literal into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4051
2025-06-23 13:22:23 +00:00
Qubasa
217f55adec clan-cli: Simplify HostKeyCheck to a Literal instead of an Enum 2025-06-23 15:08:44 +02:00
Qubasa
c4b3b26fa6 clan-cli: Move clan_cli/ssh/host_key.py to clan_lib/ssh 2025-06-23 15:07:18 +02:00
Luis Hebendanz
f1b886f04c Merge pull request 'clan-lib: Rename check_machine_online to can_ssh_login. Move to Remote object' (#4050) from Qubasa/clan-core:fix_check_online_machine into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4050
2025-06-23 12:32:39 +00:00
Qubasa
c65bd82e98 clan-lib: Rename check_machine_online to can_ssh_login. Move to Remote object 2025-06-23 14:21:51 +02:00
renovate[bot]
c4ce1e7962 chore(deps): update disko digest to 8fd2d6c 2025-06-23 12:10:18 +00:00
a-kenji
6ff64f7e0a pkgs/clan-cli: Remove confusing note from the CLI help
Remove a now obsolete and thus confusing note from the help output
of `clan show`.
2025-06-23 08:57:43 +02:00
renovate[bot]
df5de44ba3 chore(deps): update data-mesher digest to f072536 2025-06-23 00:20:19 +00:00
renovate[bot]
9f93ad59e9 chore(deps): update nix-darwin digest to 04a3412 2025-06-22 19:20:17 +00:00
hsjobeki
1e0860df22 Merge pull request 'feat(clan-services): enable recursive services' (#3972) from hsjobeki/nested-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3972
2025-06-20 12:51:27 +00:00
Johannes Kirschbauer
8bb28b7ba7 Fix(clan-services): allMachines might not contain the machineName 2025-06-20 14:41:17 +02:00
Brian McGee
36e2f25b57 feat(ui): add TagGroup component
Introduces a new `TagGroup` component for rendering grouped tags with optional inverted styling.
2025-06-20 12:22:59 +01:00
Brian McGee
2ed5d29c89 feat(ui): add Tag component
Adds a reusable `Tag` component with support for default and inverted styles. Also includes cleanup of unused dependencies in `package.json`.
2025-06-20 12:22:58 +01:00
renovate[bot]
b50fc9d6aa chore(deps): update nixos-facter-modules digest to 14df13c 2025-06-20 10:20:16 +00:00
pinpox
2138db856e Merge pull request 'fix: use custom git config in impure-checks to avoid system dependency' (#4037) from fix-impure-checks-git-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4037
2025-06-20 09:32:10 +00:00
pinpox
f308ef7e8d fix: use custom git config in impure-checks to avoid system dependency 2025-06-20 10:40:32 +02:00
Brian McGee
4586b0d17d feat(ui): rename TagStatus to MachineStatus
Standardizes naming and updates related props, classes, and types for clarity and consistency.
2025-06-20 09:13:55 +01:00
brianmcgee
430f2562c0 Merge pull request 'feat(ui): consolidate and simplify how we use colors' (#4035) from ui/color-and-css-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4035
2025-06-20 07:49:40 +00:00
Brian McGee
519b24ba0f feat(ui): consolidate and simplify how we use colors
* reconciles latest color variables from Figma
* defines the primary colors and the color system in tailwind config.
* refines how we generate utilities within the color system for `bg`, `fg` and `border`.
* removes custom box shadows, instead leaning on direct definition in CSS and `theme()`.

This change removes duplicate color information being defined as CSS variables in `index.css`
and co-locates all style information with the component
whilst retaining the ability to tie in to the color system when mapping styles from Figma.
2025-06-19 17:28:47 +01:00
Luis Hebendanz
4c0ad55e35 Merge pull request 'clan-lib: machines.py: Remove host_key attribute' (#4034) from Qubasa/clan-core:minimize_machine_obj into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4034
2025-06-19 16:14:49 +00:00
Qubasa
fae4d39a10 clan-lib: machines.py: Remove host_key attribute 2025-06-19 17:55:56 +02:00
Luis Hebendanz
72dc352a3e Merge pull request 'clan-lib: machines.py: Remove private_key attribute' (#4033) from Qubasa/clan-core:minimize_machine_obj into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4033
2025-06-19 15:40:13 +00:00
Qubasa
cce4d561e4 clan-lib: machines.py: Remove private_key attribute 2025-06-19 17:28:50 +02:00
brianmcgee
acaf04175d Merge pull request 'feat(ui): Sidebar nav' (#4018) from ui/sidebar into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4018
2025-06-19 15:19:07 +00:00
Luis Hebendanz
98bf2f325b Merge pull request 'clan-app: ui-2d remove unecessary imports' (#4032) from Qubasa/clan-core:ui-2d-logs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4032
2025-06-19 15:15:36 +00:00
Brian McGee
f7a5c99bb3 feat(ui): Sidebar nav 2025-06-19 16:03:21 +01:00
Qubasa
0d984488ed clan-app: Add vscode workspace for ui-2d 2025-06-19 17:03:04 +02:00
Qubasa
7dadcd99ff clan-app: ui-2d remove unecessary imports 2025-06-19 16:52:45 +02:00
Luis Hebendanz
c4fe02ad0b Merge pull request 'clan-app: 3d UI Remove unused files and exports' (#4029) from Qubasa/clan-core:ui_minimize-3d into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4029
2025-06-19 14:48:51 +00:00
Qubasa
3d20b41138 clan-app: Add unused import checker and autofixer. Remove unused files. 2025-06-19 15:14:08 +02:00
renovate[bot]
75a6aa810e chore(deps): update nix-darwin digest to 0d71cbf 2025-06-19 10:20:15 +00:00
kenji
4b20d6f56a Merge pull request 'pkgs/agit: Support osc8 in list subcommand' (#4028) from kenji/pkgs/agit: Support osc8 in list subcommand into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4028
2025-06-19 09:15:46 +00:00
Qubasa
eb47cf08b8 clan-app: 3d UI Remove unused files and exports 2025-06-18 22:42:00 +02:00
Luis Hebendanz
5f31825514 Merge pull request 'clan-app: Remove unused files and exports from ui-2d' (#4027) from Qubasa/clan-core:ui_minimize into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4027
2025-06-18 20:36:04 +00:00
Qubasa
0a865eee6c clan-app: Remove unused files and exports 2025-06-18 22:11:38 +02:00
a-kenji
6ee27bd8eb pkgs/agit: Support osc8 in list subcommand
Support osc8 escape sequences in `agit list` subcommand.
2025-06-18 21:47:27 +02:00
renovate[bot]
b6da0b5683 chore(deps): update dependency playwright to ~1.53.0 2025-06-18 19:34:21 +00:00
renovate[bot]
4c525c436a fix(deps): update dependency three to ^0.177.0 2025-06-18 19:20:28 +00:00
Luis Hebendanz
ac9ed0ddba Merge pull request 'ui_minimize' (#4024) from Qubasa/clan-core:ui_minimize into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4024
2025-06-18 19:17:59 +00:00
Qubasa
0ac445facc clan-app: Add knip dead code analyzer 2025-06-18 21:10:18 +02:00
Qubasa
f47db5f7c1 clan-app: Fix npm run build in ui-2d 2025-06-18 20:56:52 +02:00
kenji
c8f1434b5f Merge pull request 'pkgs/agit: Add PR status checks to the list subcommand' (#4021) from kenji/pkgs/agit: Add PR status checks to the list subcommand into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4021
2025-06-18 18:52:16 +00:00
kenji
fbc7c1188f Merge pull request 'pgks/agit: Update documentation' (#4022) from kenji/pgks/agit: Update documentation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4022
2025-06-18 18:52:10 +00:00
Qubasa
4f60dbfe28 clan-app: Add more symlinks to ui-2d 2025-06-18 20:34:54 +02:00
Qubasa
c53874c525 clan-app: Working npm run check in ui-2d folder 2025-06-18 20:31:47 +02:00
a-kenji
cb1eb3ce20 pgks/agit: Update documentation 2025-06-18 20:31:44 +02:00
a-kenji
1a771cca82 pkgs/agit: Add PR status checks to the list subcommand 2025-06-18 20:28:36 +02:00
Luis Hebendanz
03b68afaa5 Merge pull request 'UI create a separate ui-2d folder' (#3998) from Qubasa/clan-core:ui_overhaul into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3998
2025-06-18 18:11:28 +00:00
Qubasa
f80332a3f0 clan-app: Symlink more stuff from ui to ui-2d 2025-06-18 18:07:58 +02:00
Qubasa
e785a6be4e clan-app: Move changes for 2D view to separate ui-2d folder 2025-06-18 17:58:49 +02:00
Luis Hebendanz
f4a7016ece Merge pull request 'pkgs/cli(machines): Move inventory warning to debug information' (#4012) from kenji/ke-iventory-warning-debug into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4012
2025-06-18 15:39:08 +00:00
kenji
659d2a4c04 Merge pull request 'pkgs/clan: Improve machines list tests' (#4014) from kenji/pkgs/clan: Improve machines list tests into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4014
2025-06-18 14:39:54 +00:00
DavHau
7e18dc6bb4 vars-check: enable debug logging for cache misses 2025-06-18 14:22:57 +00:00
brianmcgee
8ea465d331 Merge pull request 'feat(ui): upgrade to storybook 9' (#3954) from feat/storybook-9 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3954
2025-06-18 14:19:12 +00:00
Brian McGee
f0322a8411 feat(ui): upgrade to storybook 9
Replaces rollup with wasm version for portability.
2025-06-18 15:03:43 +01:00
kenji
1f8fef726b Merge pull request 'agit: Add list subcommand to list current open AGit PRs' (#4015) from kenji/agit: Add list subcommand to list current open AGit PRs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4015
2025-06-18 14:03:29 +00:00
a-kenji
c83d3a595e pkgs/clan: Improve machines list tests
Extend and Improve `clan machines list` testing as well as the `--tags`
subcommand.
2025-06-18 16:03:02 +02:00
a-kenji
0adbf043de agit: Add list subcommand to list current open AGit PRs
Add a `list` subcommand to list currently open `AGit` PRs through the
cli.
2025-06-18 15:45:41 +02:00
pinpox
445b7a2027 Merge pull request 'Deprecated unsused modules' (#3996) from remove-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3996
2025-06-18 11:43:02 +00:00
pinpox
7f840fde61 Merge branch 'main' into remove-services 2025-06-18 11:30:31 +00:00
pinpox
6de9a9a910 Remove services and add deprecation warning 2025-06-18 13:18:25 +02:00
a-kenji
52c3006d9b pkgs/cli(machines): Move inventory warning to debug information
Move the inventory warning to debug information and improve the error.

This is an alternative proposal to: #4009
2025-06-18 13:15:37 +02:00
Luis Hebendanz
100e01b32c Merge pull request 'pkgs/clan: Rename target_host_str' (#4010) from kenji/ke-iventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4010
Reviewed-by: Luis Hebendanz <consulting@qube.email>
2025-06-18 10:58:58 +00:00
Qubasa
1b23d5dcf3 clan-app: Fix storybook tests 2025-06-18 12:55:47 +02:00
Qubasa
0c432d5c25 clan-app: Untangle Machine Details into separate components. Makes it non functional for now. 2025-06-18 12:49:43 +02:00
Qubasa
143dfc99dc clan-app: Improve api test page 2025-06-18 12:49:43 +02:00
Qubasa
3835624040 clan-lib: Set "root" as default user in Remote object 2025-06-18 12:49:43 +02:00
a-kenji
c1a4de843a pkgs/clan: Rename target_host_str
The `target_host_str` is a confusing choice, since it can be either
the `targetHost` or `buildHost`.
2025-06-18 12:03:57 +02:00
Michael Hoang
d9f2c1681f Merge pull request 'cli: fix machines update failing with protocol mismatch on macOS' (#4008) from push-rmpkuustzxxu into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4008
2025-06-18 10:01:32 +00:00
kenji
b4b6bf8e16 Merge pull request 'docs/testing: Improve testing documentation' (#4007) from kenji/docs/testing: Improve testing documentation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4007
2025-06-18 09:41:37 +00:00
Michael Hoang
84e280e32d cli: fix machines update failing with protocol mismatch on macOS 2025-06-18 16:30:11 +07:00
a-kenji
688aad716d docs/testing: Improve testing documentation 2025-06-18 11:12:30 +02:00
kenji
d531ee2296 Merge pull request 'gitignore: Remove unused dream2nix rules' (#4005) from kenji/gitignore: Remove unused dream2nix rules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4005
2025-06-18 09:12:15 +00:00
kenji
7d96e8455e Merge pull request 'gitignore: Remove obsolete or unused rules' (#4004) from kenji/gitignore: Remove obsolete or unused rules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4004
2025-06-18 09:11:10 +00:00
kenji
12151b91dd Merge pull request 'clanServices/hello-world: Fix eval-test example formatting' (#4003) from kenji/clanServices/hello-world: Fix eval-test example formatting into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4003
2025-06-18 09:08:27 +00:00
a-kenji
2cb588d5a8 gitignore: Remove unused dream2nix rules 2025-06-18 10:52:18 +02:00
a-kenji
f6680a1f8b gitignore: Remove flatpak 2025-06-18 10:50:37 +02:00
a-kenji
3f8203077e gitignore: Remove unclear gitignored files 2025-06-18 10:50:20 +02:00
Mic92
69b7b61cc7 Merge pull request 'pkgs/agit: Update documentation' (#3995) from kenji/pkgs/agit: Update documentation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3995
2025-06-18 08:48:11 +00:00
a-kenji
111172e514 clanServices/hello-world: Fix eval-test example formatting 2025-06-18 10:45:59 +02:00
renovate[bot]
90d3de3514 chore(deps): update data-mesher digest to cb75111 2025-06-17 19:21:50 +00:00
Mic92
63e741ed20 Merge pull request 'Introduce flake parts module for clan nixos tests' (#4000) from speed-up-ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4000
2025-06-17 19:20:08 +00:00
Jörg Thalheim
a260083919 fix(vars-check): include generator scripts in test closure
The vars-check test was failing because it only included the
runtimeInputs of generators but not the actual generator scripts
themselves. This caused the test to fail when trying to execute
generators that reference local files (like generate.py).

Added allGeneratorScripts to the closureInfo to ensure all generator
scripts and their dependencies are available in the test environment.
2025-06-17 21:09:59 +02:00
Jörg Thalheim
80a0f66809 no longer make test derivation depends on vars-check
this triggers more builds than necessary.
2025-06-17 21:09:59 +02:00
Jörg Thalheim
c03fda1b84 zerotier: migrate to clan.nixosTests module 2025-06-17 21:09:59 +02:00
Jörg Thalheim
be760704eb wifi: migrate to clan.nixosTests module 2025-06-17 20:39:06 +02:00
Jörg Thalheim
9cefd70bf8 users: migrate to clan.nixosTests module 2025-06-17 20:39:06 +02:00
Jörg Thalheim
d31c9d1537 trusted-nix-caches: migrate to clan.nixosTests module 2025-06-17 20:38:31 +02:00
Jörg Thalheim
8e2fc1056f state-version: migrate to clan.nixosTests module 2025-06-17 20:38:31 +02:00
Jörg Thalheim
41513e6a70 sshd: migrate to clan.nixosTests module 2025-06-17 19:32:04 +02:00
Jörg Thalheim
e5d6d6e7f9 packages: migrate to clan.nixosTests module 2025-06-17 19:31:09 +02:00
Jörg Thalheim
b2a587021f mycelium: migrate to clan.nixosTests module 2025-06-17 19:30:21 +02:00
Jörg Thalheim
509b18647c localsend: migrate to clan.nixosTests module 2025-06-17 19:29:08 +02:00
Jörg Thalheim
3535350cb6 hello-world: migrate to clan.nixosTests module 2025-06-17 19:28:12 +02:00
Jörg Thalheim
4459899fb6 heisenbridge: migrate to clan.nixosTests module 2025-06-17 19:27:15 +02:00
Jörg Thalheim
a6f0f27f02 garage: migrate to clan.nixosTests module 2025-06-17 19:26:25 +02:00
Jörg Thalheim
88e935f7c9 ergochat: migrate to clan.nixosTests module 2025-06-17 19:24:09 +02:00
Jörg Thalheim
12cdc279e8 deltachat: make test more robust with wait_until_succeeds
Use wait_until_succeeds for the first network check to ensure the
service is fully ready before testing connectivity.
2025-06-17 19:18:04 +02:00
Jörg Thalheim
e9cded4fd8 deltachat: migrate to clan.nixosTests module 2025-06-17 19:13:25 +02:00
Jörg Thalheim
065c697e0b borgbackup: migrate to clan.nixosTests module 2025-06-17 19:04:47 +02:00
Jörg Thalheim
268a95f2e4 clan-nixos-test: pass clan-core to test nodes via module args
This allows tests that need access to clan-core (e.g. for clan-cli or
dependencies) to use it within their node configurations.
2025-06-17 19:04:47 +02:00
Jörg Thalheim
3a1b2aede8 admin: migrate to clan.nixosTests module 2025-06-17 19:04:47 +02:00
Jörg Thalheim
29b2c51391 clan-nixos-test: add individual vars-checks back
The consolidated vars-check was too slow to eval. Individual vars-checks allow for better parallelization.
2025-06-17 18:49:16 +02:00
Jörg Thalheim
28d3cee649 introduce flake parts module for clan nixos tests 2025-06-17 18:38:52 +02:00
Mic92
9518fb660b Merge pull request 'fix: correctly check existence of CLAN_TEST_STORE paths in cache' (#3999) from fix-clan-test-store-caching into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3999
2025-06-17 15:38:13 +00:00
Jörg Thalheim
d9c97fcb10 fix: correctly check existence of CLAN_TEST_STORE paths in cache
The flake cache was only checking existence for paths starting with
NIX_STORE_DIR (defaulting to /nix/store), but not for paths in the
test store when CLAN_TEST_STORE is set. This caused the cache to
return stale references to paths that had been garbage collected.

This fix updates the is_cached method to also check for paths in 
the test store, preventing cache misses during tests.
2025-06-17 17:21:06 +02:00
Mic92
9064848d86 Merge pull request 'machines: fix remote-program for darwin nix copy' (#3993) from darwin-remote-program into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3993
2025-06-17 14:45:43 +00:00
Jörg Thalheim
5dbe44bb43 machines: fix remote-program for darwin nix copy
MacOS doesn't come with a proper login shell for ssh and therefore
doesn't have nix in $PATH as it doesn't source /etc/profile.
This restores the remote-program parameter that was accidentally
removed in commit cff5d61f26.
2025-06-17 16:30:04 +02:00
Mic92
578b620e68 Merge pull request 'garage: make test more reliable' (#3997) from garage-test-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3997
2025-06-17 14:26:48 +00:00
Jörg Thalheim
733fe41b4e garage: make test more reliable 2025-06-17 16:10:38 +02:00
Mic92
d4d37ad4ff Merge pull request 'add run-vm-test-offline package for offline VM testing' (#3994) from run-vm-test-offline into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3994
2025-06-17 13:20:19 +00:00
kenji
12247c705a Merge pull request 'chore(deps): lock file maintenance' (#3975) from renovate/lock-file-maintenance into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3975
2025-06-17 12:47:57 +00:00
renovate[bot]
21ca1ed152 chore(deps): lock file maintenance 2025-06-17 12:47:57 +00:00
Mic92
64e5d40de5 Merge pull request 'clan-lib: Make Remote overridable over function arguments' (#3969) from Qubasa/clan-core:nix_transform_host_options into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3969
2025-06-17 12:47:00 +00:00
a-kenji
f796a7531c pkgs/agit: Update documentation 2025-06-17 14:45:43 +02:00
kenji
8a2bd8c03c Merge pull request 'agit: Add latest commit information to comment' (#3990) from kenji/agit: Add latest commit information to comment into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3990
2025-06-17 12:43:22 +00:00
Jörg Thalheim
f7f6b22f92 add run-vm-test-offline package for offline VM testing
This package allows running NixOS VM tests in an offline environment
using network namespace isolation. It builds the test driver and runs
it with unshare to ensure no network access.
2025-06-17 14:41:12 +02:00
Qubasa
2c57c35517 clan-lib: Refactor remote host handling to function parameters
This refactoring improves the separation of concerns by moving remote host creation logic from the Machine class to the calling functions, making the code more flexible and testable.
2025-06-17 14:04:22 +02:00
kenji
c303ed8347 Merge pull request 'agit: Set COMMIT_EDITMSG as filetype' (#3991) from kenji/agit: Set COMMIT_EDITMSG as filetype into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3991
2025-06-17 12:02:03 +00:00
Qubasa
75bfed044b clan-app: Fix UI errors 2025-06-17 13:53:43 +02:00
Qubasa
344259aa56 genmoon.py: Fix type error 2025-06-17 13:53:43 +02:00
Qubasa
fa4160dda1 clan-lib: Make Remote overridable over function arguments 2025-06-17 13:53:43 +02:00
a-kenji
7c871cdeb2 agit: Add latest commit information to comment
Add latest commit information to the editor comments.
That way we can easily adjust the PR based on the latest commit.
2025-06-17 13:50:36 +02:00
Mic92
2af619609a Merge pull request 'install: correctly pass nix options to nixos-anywhere' (#3989) from nixos-anywhere-options into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3989
2025-06-17 11:49:13 +00:00
kenji
6ab082d080 Merge pull request 'agit: Add -a flag alias for --auto' (#3992) from kenji/agit: Add -a flag alias for --auto into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3992
2025-06-17 11:44:04 +00:00
a-kenji
02f362df92 agit: Add -a flag alias for --auto 2025-06-17 12:45:37 +02:00
Jörg Thalheim
7ce65f429c install: correctly pass nix options to nixos-anywhere
The nix_options were collected but never passed to the nixos-anywhere command.
This fix adds the options to the command before the target host argument.
2025-06-17 12:43:20 +02:00
a-kenji
e6ed020423 agit: Set COMMIT_EDITMSG as filetype 2025-06-17 12:42:12 +02:00
kenji
4575251b7f Merge pull request 'clanServices: Enable garage by default' (#3987) from kenji/clanServices: Enable garge by default into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3987
2025-06-17 10:33:26 +00:00
Mic92
79f1bed800 Merge pull request 'make setupNixInNixPython a python package' (#3984) from setupNixInNixPython-only into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3984
2025-06-17 10:14:53 +00:00
kenji
212a02a202 Merge pull request 'pyproject: Fix typo' (#3963) from kenji/pyproject: Fix typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3963
2025-06-17 10:08:53 +00:00
a-kenji
55db78fbde clanServices/garage: Enable garage by default 2025-06-17 12:06:41 +02:00
kenji
19eed0cff5 Merge pull request 'agit: Add documentation to EDIT_MSG and strip comments' (#3986) from kenji/agit: Add documentation to EDIT_MSG and strip comments into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3986
2025-06-17 10:01:29 +00:00
Jörg Thalheim
0fb326b2f3 Apply nix fmt on setupNixInNixPython-only 2025-06-17 12:01:12 +02:00
a-kenji
f92cc19647 agit: Add documentation to EDIT_MSG and strip comments
Add documentation to EDIT_MSG and strip comments
2025-06-17 11:48:12 +02:00
kenji
47cf00df60 Merge pull request 'agit: Allow specifying commit information through the editor' (#3982) from kenji/agit: Allow specifying commit information through the editor into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3982
2025-06-17 09:27:39 +00:00
a-kenji
3ada326fde agit: Allow specifying through EDITOR 2025-06-17 11:00:03 +02:00
renovate[bot]
30dfe1656f chore(deps): update sops-nix digest to 77c423a 2025-06-17 00:20:11 +00:00
a-kenji
80ad10b8e5 pkgs/*: Remove pytest coverage testing from every single test run
There was no noticeable positive impact from having coverage reports on
every single test run.

While adding a separate command to check coverage might be added in the
future, the overhead of collecting the coverage for every test run made
seems not worth it currently.
2025-06-16 15:46:36 +00:00
pinpox
1132185b7d Merge pull request 'Migrate state-version to clanServices' (#3947) from migrate-state-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3947
2025-06-16 13:29:20 +00:00
pinpox
c9433a7784 Merge pull request 'Migrate packages module to clanServices' (#3945) from migrate-packages into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3945
2025-06-16 10:36:56 +00:00
pinpox
d1d15c34b7 add docs 2025-06-16 12:22:25 +02:00
pinpox
3b0fb23082 Migrate packages module to clanServices 2025-06-16 12:22:24 +02:00
kenji
003c128482 Merge pull request 'zerotier: Add a default to the allowedIps controller setting' (#3959) from kenji/zerotier: Add a default to the allowedIps controller setting into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3959
2025-06-16 10:07:11 +00:00
pinpox
13b987d3c4 migrate state-version 2025-06-16 11:28:35 +02:00
pinpox
482fee1ff2 Merge pull request 'Migrate trusted-nix-caches to clanServices' (#3949) from migrate-nix-caches into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3949
2025-06-16 09:03:08 +00:00
renovate[bot]
f3fccb1d9c chore(deps): update disko digest to 7f1857b 2025-06-16 02:50:14 +00:00
Johannes Kirschbauer
aabe253bf9 feat(clan-services): enable recursive services
Using recursive services is potentially complex and requires carefully
designed services. Nested Services create nixos modules which must be
mergable as always.
2025-06-15 20:06:02 +02:00
Michael Hoang
9bd1ce9a6f Merge pull request 'clanServices/emergency-access: use more descriptive instance name' (#3974) from push-nmlzqzptwsmv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3974
2025-06-15 06:39:54 +00:00
Michael Hoang
8a7120b3da clanServices/emergency-access: use more descriptive instance name 2025-06-15 13:27:40 +07:00
Johannes Kirschbauer
e14fbb66b1 chore(clan-service): remove and unify unecessary bindings 2025-06-14 20:03:53 +02:00
Johannes Kirschbauer
ca0a56292e feat(clan-service): add module context for better error messages 2025-06-14 20:03:53 +02:00
hsjobeki
f0e3b753dc Merge pull request 'Feat(machine/templates): simplify template args for machines command' (#3937) from hsjobeki/template-ux into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3937
2025-06-14 08:25:28 +00:00
hsjobeki
6501b50058 Merge pull request 'Docs(cli/flash): improve disk instructions' (#3958) from hsjobeki/ux into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3958
2025-06-14 08:13:50 +00:00
renovate[bot]
9af3cc88bf chore(deps): update nix-darwin digest to 2f140d6 2025-06-14 05:00:12 +00:00
renovate[bot]
2820adb07a chore(deps): update data-mesher digest to b7cc9ee 2025-06-13 18:00:12 +00:00
kenji
69dfee3316 Merge pull request 'clanServices/zerotier: Add eval tests' (#3968) from kenji/clanServices/zerotier: Add eval tests into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3968
2025-06-13 13:21:20 +00:00
a-kenji
96325c0c29 clanServices/zerotier: Add eval tests
Add eval tests to the zerotier clanService module.

The vm module is a stub that acts as an api for the `generate-test-vars`
script, as that currently only works with a vm, not with an eval test.

This checks, if all the peers pick up their respective configuration
correctly. Without running the service itself.
2025-06-13 14:58:27 +02:00
kenji
626c80f029 Merge pull request 'emergency-access: Don't deploy plaintext passwords' (#3966) from kenji/emergency-access: Don't deploy plaintext passwords into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3966
Reviewed-by: Michael Hoang <enzime@noreply.git.clan.lol>
2025-06-13 11:50:00 +00:00
kenji
3c81b6073d Merge pull request 'emergency-access: Use default instead of mylounge instance name' (#3965) from kenji/emergency-access: Use default instead of mylounge instance name into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3965
2025-06-13 11:49:47 +00:00
a-kenji
30f1d1e6da emergency-access: Don't deploy plaintext passwords
Don't deploy the plaintext emergency password to the target machine.
It doesn't seem to be used anywhere.
2025-06-13 13:30:59 +02:00
a-kenji
34a0e077ee emergency-access: Use default instead of mylounge instance name
The mylounge instance name seems confusing.
2025-06-13 13:26:19 +02:00
kenji
edb156a387 Merge pull request 'checks: Remove the syncthing check again' (#3964) from kenji/checks: Remove the syncthing check again into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3964
2025-06-13 11:23:18 +00:00
a-kenji
c2f20c0ff0 checks: Remove the syncthing check again
Someone readded it for some unknown reason.
2025-06-13 13:08:29 +02:00
a-kenji
333a06456e pyproject: Fix typo 2025-06-13 13:05:21 +02:00
Luis Hebendanz
48a91d2017 Merge pull request 'clan-app: Propagate op_key to callApi callers.' (#3961) from Qubasa/clan-core:ui_get_op_key into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3961
2025-06-13 10:55:23 +00:00
Qubasa
8e79f78ef2 clan-app: Propagate op_key to callApi callers. 2025-06-13 12:41:58 +02:00
a-kenji
858b34769e zerotier: Add a default to the allowedIps controller setting 2025-06-13 11:48:58 +02:00
Johannes Kirschbauer
8b72d569e7 Docs(cli/flash): improve disk instructions 2025-06-13 11:37:39 +02:00
Michael Hoang
eabf7f86fc Merge pull request 'cli: don't error when more than one SOPS key found locally' (#3946) from push-tmsrnssnwrvn into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3946
Reviewed-by: brianmcgee <brian@bmcgee.ie>
2025-06-13 08:00:37 +00:00
pinpox
f1a0114739 Merge pull request 'emergency-access: init service' (#3950) from emergency-access into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3950
Reviewed-by: pinpox <clan@pablo.tools>
2025-06-13 07:45:05 +00:00
Michael Hoang
6b4df65412 cli: don't error when more than one SOPS key found locally 2025-06-13 14:37:19 +07:00
Michael Hoang
fc13e0be51 emergency-access: init service 2025-06-13 14:21:01 +07:00
Michael Hoang
41822097c7 Merge pull request 'cli: fix secrets key update failing when used with Nix in Nix' (#3956) from push-kzwtmtqokywm into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3956
2025-06-13 06:49:32 +00:00
Michael Hoang
362a889d0f cli: fix secrets key update failing when used with Nix in Nix 2025-06-13 13:36:29 +07:00
renovate[bot]
b16dc0a58f chore(deps): update nix-darwin digest to 72c88d5 2025-06-12 16:00:14 +00:00
brianmcgee
3239d4b614 Merge pull request 'UI: new Loader component; Button and Icon v2' (#3908) from ui/button into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3908
2025-06-12 15:52:17 +00:00
Luis Hebendanz
02a4c49952 Merge pull request 'init machine from inventory' (#3862) from Qubasa/clan-core:refactor_machinev2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3862
2025-06-12 15:05:44 +00:00
Qubasa
85537b7816 clan-lib: unify get_taget_host and get_build_host 2025-06-12 16:42:28 +02:00
Qubasa
e1091c0692 clan-cli: machine.get_inv_machine now uses actions.get_machine in the background 2025-06-12 16:36:55 +02:00
Qubasa
82299a5361 clan-cli: Fix check_machine_online to use Remote object instead of machine, this makes it possible to override HostKeyCheck properly 2025-06-12 16:36:55 +02:00
Qubasa
2540215f2e clan-cli: init machine from inventory 2025-06-12 16:36:55 +02:00
Luis Hebendanz
33be415922 Merge pull request 'clan-lib: Add log_manager api, clan-app: Fix API test page' (#3943) from Qubasa/clan-core:ui_log_collection2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3943
2025-06-12 14:35:15 +00:00
Qubasa
e6025493c4 clan-lib: Add LogManager class 2025-06-12 16:24:40 +02:00
Qubasa
726b8f4c6c clan-lib: Move task functions to own file 2025-06-12 16:23:53 +02:00
Qubasa
42ac12b34e clan-app: Fix api test page 2025-06-12 16:23:33 +02:00
lassulus
184f16d6f1 Merge pull request 'generate_test_vars: add support for darwin' (#3952) from lassulus/clanTest_darwin into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3952
2025-06-12 13:58:30 +00:00
lassulus
a267cc2f69 generate_test_vars: add support for darwin 2025-06-12 14:49:12 +02:00
pinpox
5a50463fb7 migrate trusted-nix-caches 2025-06-12 14:01:51 +02:00
Brian McGee
8f93015d80 feat(ui): new loader component; button and icon v2 2025-06-12 11:29:41 +01:00
renovate[bot]
e1df99ea31 chore(deps): update nix-darwin digest to e2da333 2025-06-12 08:10:12 +00:00
pinpox
3e94b75ada Merge pull request 'Migrate user-password and root-password to clan Services' (#3918) from migrate-user-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3918
Reviewed-by: lassulus <clanlol@lassul.us>
2025-06-12 08:08:36 +00:00
pinpox
db5e23e701 migrate clanmodules/{user,root}-password to clanServices/users
Move the functionality of both modules into a new clanService.
root-password was previously just a special case of user-password. This
migrates it into a deduplicated clan service and adds checks
2025-06-12 09:04:26 +02:00
Johannes Kirschbauer
0b6c30e8ad Fix(morph): ensure machine dir exists 2025-06-11 20:38:15 +02:00
Johannes Kirschbauer
8c02119ac0 fix(templates): add error handling 2025-06-11 20:22:20 +02:00
Johannes Kirschbauer
70bc7d3f0c feat(templates_urls): short circuit input names 2025-06-11 20:21:29 +02:00
Johannes Kirschbauer
2d2af10c78 feat(flake): add function to get input names 2025-06-11 20:21:29 +02:00
Johannes Kirschbauer
0e88b0ff66 feat(flake/select): add apply argument 2025-06-11 20:21:29 +02:00
pinpox
27998d777a Merge pull request 'Migrate sshd to clanServices' (#3912) from migrate-sshd into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3912
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-06-11 16:29:43 +00:00
Johannes Kirschbauer
acc41be9b3 doc(cli/templates): improve help description 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
e80a3fd2fc fix(tess/morph): skip creating existing machine 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
b6a0c6cb38 Docs(cli/machines): improve description of '--template' 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
b80395af44 Chore(machine/templates): simplify template args for machines command 2025-06-11 17:00:08 +02:00
Johannes Kirschbauer
43bc5f0812 Feat(template_url): substitute local refs
To execute the CLI in foreign directories
.#new-machine needs to get tranformed into /path/to/clan#new-machine
Otherwise it might pick-up some random flake that is in scope where the cli started executing
2025-06-11 16:59:32 +02:00
Johannes Kirschbauer
a9c933ac01 Feat(templates): init with_machine_template context handler 2025-06-11 16:52:52 +02:00
Johannes Kirschbauer
4a126fee12 Feat(templates): export clan templates statically 2025-06-11 16:52:52 +02:00
Johannes Kirschbauer
d166f73c00 Feat(templates): add template selector tranformation 2025-06-11 16:52:50 +02:00
pinpox
e4bb9e1958 Migrate sshd to clanServices
- migrate service
- add deprecation notice to old module
- add check
- update docs
2025-06-11 15:43:51 +02:00
lassulus
be0a5202e7 Merge pull request 'bugfix for persistent loginctl sessions' (#3903) from pr-3886 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3903
2025-06-11 13:15:04 +00:00
kenji
3fee93811a Merge pull request 'pkgs/distro-packages: Remove the distro packages' (#3941) from kenji/pkgs/distro-packages: Remove the distro packages into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3941
Reviewed-by: lassulus <clanlol@lassul.us>
2025-06-11 13:00:44 +00:00
DavHau
c624119ad0 Merge pull request 'dummy-test: add vars' (#3940) from davhau/test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3940
2025-06-11 12:55:41 +00:00
lassulus
35a7bbf5d8 clan-cli: reduce ssh controlmaster timeout to 1min 2025-06-11 14:39:50 +02:00
adeci
31f79abb53 bugfix for persistent loginctl sessions 2025-06-11 14:38:37 +02:00
DavHau
559baa56a8 dummy-test: add vars 2025-06-11 19:30:13 +07:00
DavHau
b13f64c96d clan tests: allow testing CLI interactions
This is an improvement of the clanTest nixos vm test module.

The module now has a new option clan.test.fromFlake that allows to specify a flake.nix as the source for the test clan instead of specifying clan.XXX options.

This in turn allows accessing the `flake.nix` inside the test driver allowing to use the clan cli on it
2025-06-11 19:30:13 +07:00
kenji
90746e0a19 Merge pull request 'borgbackup: Move tests close to service' (#3939) from kenji/borgbackup: Move tests close to service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3939
2025-06-11 12:05:50 +00:00
a-kenji
a64f68f37a pkgs/distro-packages: Remove the distro packages
Remove the distro packages for now.
They can be added back, if we actually need them again.
2025-06-11 13:54:13 +02:00
a-kenji
a5d15d7832 borgbackup: Move tests close to service 2025-06-11 13:47:29 +02:00
kenji
f86816ec1e Merge pull request 'agit: init agit helper' (#3938) from kenji/agit: init agit helper into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3938
2025-06-11 10:39:48 +00:00
a-kenji
de5306e16d agit: init agit helper
This initializes a very simple AGit helper script.

Usage:

```
agit create
```
or
```
agit c
```

To create a new AGit Pr.

Integrate Pulling from an AGit remote.
Gitea doesn't expose an AGit endpoint in the api, or the `tea` cli.
This makes pulling not feasible, since there is no robust way to query
the AGit topic, which is the ref that need to be pulled.

One possible solution currently could be scraping the gitea instructions
for forking a pull request on an AGit PR.
2025-06-11 12:26:19 +02:00
renovate[bot]
0e6f8766f7 chore(deps): update sops-nix digest to 50754df 2025-06-10 22:10:12 +00:00
hsjobeki
1414c8e519 Merge pull request 'Chore(templates): move helper functions into a util file' (#3930) from hsjobeki/utils into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3930
2025-06-10 17:52:44 +00:00
hsjobeki
1b411fe8d3 Merge pull request 'Chore(complete_machines): simplify by using inventoryStore' (#3929) from hsjobeki/cleanups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3929
2025-06-10 17:42:55 +00:00
Johannes Kirschbauer
8ca3dc36d7 Chore(templates): move helper functions into a util file 2025-06-10 19:38:10 +02:00
Johannes Kirschbauer
17527082f4 chore(clanInternals): remove unused 'templates' attribute" 2025-06-10 19:26:04 +02:00
Johannes Kirschbauer
7b7e1cf246 feat(clanInternals): dont allow superfluous options 2025-06-10 19:16:26 +02:00
Johannes Kirschbauer
30fe01be7b Chore(complete_machines): simplify by using inventoryStore 2025-06-10 19:15:07 +02:00
Johannes Kirschbauer
b2785d3b24 Chore(flake.py): remove unused uncached_nix_eval_with_args 2025-06-10 19:15:07 +02:00
hsjobeki
40b8e87659 Merge pull request 'Chore(clanInternals): remove unused attributes' (#3925) from hsjobeki/clanInternals into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3925
2025-06-10 17:12:33 +00:00
Johannes Kirschbauer
b429aed8f4 Fix(tests/buildClan): reduce expected attributes 2025-06-10 19:00:57 +02:00
Johannes Kirschbauer
78563b0544 Fix(clan.nix): create public attributes from 'clan', dont expose them from clanInternals
ClanInternals is already exposed at the toplevel the API can access anything
This also deduplicated 'templates' and 'modules' into 'clan.modules' and 'clan.templates' repsectively
Only this one path is its source
2025-06-10 18:51:42 +02:00
Johannes Kirschbauer
e322c92b2e Chore(clanInternals): remove unused attributes 2025-06-10 18:27:16 +02:00
hsjobeki
0f6731c813 Merge pull request 'Refactor(clanInternals): remove depending on clanInternals.inventory' (#3928) from hsjobeki/no-more-inventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3928
2025-06-10 16:00:50 +00:00
Johannes Kirschbauer
0837a8ecd7 Refactor(clanInternals): remove depending on clanInternals.inventory 2025-06-10 17:43:59 +02:00
hsjobeki
b9d7dac65f Merge pull request 'Refactor(autocompletions): use inventoryStore' (#3927) from hsjobeki/completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3927
2025-06-10 15:39:56 +00:00
Johannes Kirschbauer
3562c17514 Refactor(autocompletions): use inventoryStore 2025-06-10 17:02:16 +02:00
Johannes Kirschbauer
6e5de97a30 Feat(inventoryStore): add get_raw to read all the values unsafe 2025-06-10 17:02:16 +02:00
hsjobeki
585e6b677a Merge pull request 'Chore(show_clan_meta): use data from inventoryStore' (#3926) from hsjobeki/show_clan_meta into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3926
2025-06-10 14:58:58 +00:00
Johannes Kirschbauer
0f36041054 Chore(show_clan_meta): use data from inventoryStore 2025-06-10 16:46:18 +02:00
hsjobeki
45ef48a245 Merge pull request 'Fix(tests/templates): add narHash to allow local tests execution in devShell' (#3922) from fix-tests into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3922
2025-06-10 13:50:34 +00:00
Johannes Kirschbauer
55a92f1893 Fix(tests/substitutions): use different substitutions for nix-build and local environment 2025-06-10 15:34:56 +02:00
Johannes Kirschbauer
de32037255 Fix(tests/templates): add narHash to allow local tests execution in devShell 2025-06-10 12:36:58 +02:00
kenji
a4900faf27 Merge pull request 'user-password: Improve prompting documentation' (#3920) from ke-prompt into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3920
2025-06-10 09:48:16 +00:00
a-kenji
961e650a85 user-password: Improve prompting documentation 2025-06-10 11:04:22 +02:00
kenji
c3a9cccdd8 Merge pull request 'checks: Disable syncthing test for now' (#3919) from ke-disable-syncthing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3919
2025-06-10 09:00:19 +00:00
a-kenji
992d5cbe46 checks: Disable syncthing test for now
Syncthing is currently being migrated and we can look at the test again
once we migrated.
It recently got changes upstream which might explain the spurious test
failures.
2025-06-10 10:46:28 +02:00
Michael Hoang
57a64c9a0b Merge pull request 'cli: fix clan secrets key update not working when age plugins defined' (#3916) from push-xrynsrlvulmu into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3916
2025-06-10 07:29:35 +00:00
Michael Hoang
11bc2c00c2 cli: fix clan secrets key update not working when age plugins defined 2025-06-10 14:07:10 +07:00
Michael Hoang
1b86f9efca Merge pull request 'vars: don't use sops.secrets.*.restartUnits on macOS' (#3917) from push-mtooonxozntq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3917
2025-06-10 07:05:53 +00:00
Michael Hoang
213f12ce01 vars: don't expose restartUnits on macOS 2025-06-10 13:48:06 +07:00
Michael Hoang
49bec8536b vars: don't use sops.secrets.*.restartUnits on macOS 2025-06-10 13:27:15 +07:00
hsjobeki
9b5410a46d Merge pull request 'chore(api/create_clan): remove unused reponse class' (#3907) from api-narrowing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3907
2025-06-09 19:00:27 +00:00
Johannes Kirschbauer
8360ee58b5 chore(flake): move 'inputs-from' into templates handling 2025-06-09 20:40:20 +02:00
Johannes Kirschbauer
03a2412227 chore(inspect): use simple list_machines 2025-06-09 20:33:17 +02:00
Johannes Kirschbauer
25875422f2 chore(api/create_clan): remove unused reponse class 2025-06-09 20:30:20 +02:00
Luis Hebendanz
94f8e365f9 Merge pull request 'clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser' (#3914) from Qubasa/clan-core:deploy_info2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3914
Reviewed-by: hsjobeki <hsjobeki@gmail.com>
2025-06-09 17:45:30 +00:00
Qubasa
65a0843de7 clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser 2025-06-09 19:27:01 +02:00
Michael Hoang
bd402b99c9 Merge pull request 'testing: fix Nix in Nix when remote building' (#3911) from ninixx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3911
2025-06-09 14:10:35 +00:00
Michael Hoang
f771168b76 testing: fix Nix in Nix when remote building 2025-06-09 20:58:08 +07:00
kenji
eb6880c5ec Merge pull request 'clanServices: Move service tests to appropriate locations' (#3909) from ke-move-service-checks-to-service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3909
2025-06-09 13:26:31 +00:00
a-kenji
4670dbfd6a clanServices: Move ergochat test to appropriate location
Move the ergochat clanService test to the ergochat clan service.
The tests should live close to the definition of the service, so that
debugging and discoverability is better.
2025-06-09 15:05:40 +02:00
a-kenji
cd5743b56f clanServices: Move heisenbridge test to appropriate location
Move the heisenbridge clanService test to the heisenbridge clan service.
The tests should live close to the definition of the service, so that
debugging and discoverability is better.
2025-06-09 15:05:40 +02:00
a-kenji
b2bc845d88 clanServices: Move deltachat test to appropriate location
Move the deltachat clanService test to the deltachat clan service.
The tests should live close to the definition of the service, so that
debugging and discoverability is better.
2025-06-09 15:05:40 +02:00
DavHau
7cf065ae8c buildClan function: export all machines via nixosModules/darwinModules
We want each machine not only to be exposed via nixosConfigurations but also as a module.
This allows re-importing the machine in tests and override the architecture for example.
2025-06-09 12:51:22 +00:00
kenji
3a7fd3085e Merge pull request 'clanServices: Move mycelium test to appropriate location' (#3902) from ke-move-mycelium-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3902
2025-06-09 12:04:39 +00:00
hsjobeki
1af826e0df Merge pull request 'Refactor(api/update_machine): rename to set_machine; use name, flake' (#3899) from api-narrowing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3899
2025-06-09 11:55:28 +00:00
Johannes Kirschbauer
665b2095b2 Refactor(cli/list_machines): rename to list_full_machines
This makes it clear that this should be used with care
It is potentially more expensive to create the full object, therefore it should be discouraged by its longer name
This listing is implemented based on the basic listing, where each item is turned into the bigger machine class
2025-06-09 13:40:57 +02:00
Johannes Kirschbauer
0b6bc81efe Refactor(api/list_machines): rename from list_inv_machines 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
155f3721eb refactor: cleanup unused imports
They are registered already if they are located as module in clan_lib
2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
6a8604f2b8 refactor(clan_lib): move show_clan_meta to clan_lib 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
ea65ca448d refactor(clan_lib): move update to clan_lib.clan 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
ebf3964197 Refactor(api/update_machine): rename to set_machine; use name, flake 2025-06-09 13:33:19 +02:00
kenji
3f1b776a5b Merge pull request 'clanServices: Move admin test to appropriate location' (#3905) from ke-move-admin-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3905
2025-06-09 11:30:43 +00:00
a-kenji
5e4167e375 clanServices: Move mycelium test to appropriate location
Move the mycelium clanService test to the mycelium clan service.
The tests should live close to the definition of the service, so that
debugging and discoverability is better.
2025-06-09 13:17:36 +02:00
a-kenji
08618e6c66 clanServices: Move admin test to appropriate location
Move the admin clanService test to the admin clan service.
The tests should live close to the definition of the service, so that
debugging and discoverability is better.
2025-06-09 13:01:48 +02:00
kenji
977c57579d Merge pull request 'clanServices: Move garage test to appropriate location' (#3901) from ke-move-garage-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3901
2025-06-09 10:55:44 +00:00
kenji
af9b878ccf Merge pull request 'clanServices: Move localsend test to appropriate location' (#3900) from ke-move-localsend-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3900
2025-06-09 10:55:28 +00:00
a-kenji
508e8cf85e clanServices: Move localsend test to appropriate location
Move the localsend clanService test to the localsend clan service.
2025-06-09 12:38:39 +02:00
a-kenji
5fbe24bb53 clanServices: Move garage test to appropriate location #3900
Move the garage clanService test to the garage clan service.
2025-06-09 12:37:49 +02:00
lassulus
050d582230 Merge pull request 'revert #3883' (#3898) from lassulus/revert_qubasa into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3898
2025-06-09 09:58:09 +00:00
lassulus
2460ac970f Revert "clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser"
This reverts commit 2ca3b5d698.
2025-06-09 11:28:15 +02:00
hsjobeki
2a576a604b Merge pull request 'Chore(api): narrow down get_machine' (#3863) from api-narrowing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3863
2025-06-09 08:59:36 +00:00
DavHau
ae611e8fde lib: mkOfflineFlakeLock init
copied from the clan-core-flake module

I plan to re-use this function to improve the clan test framework to allow cli execution
2025-06-09 15:23:09 +07:00
DavHau
4616545cba build-clan: refactor: don't only use imports 2025-06-09 13:24:27 +07:00
renovate[bot]
e3bc6d14f4 chore(deps): update disko digest to dfa4d1b 2025-06-09 02:50:13 +00:00
renovate[bot]
2672adcbb5 chore(deps): update data-mesher digest to ae2b263 2025-06-09 00:20:24 +00:00
renovate[bot]
4e445448f0 chore(deps): lock file maintenance 2025-06-09 00:00:32 +00:00
renovate[bot]
edebb91a0b chore(deps): update flake-parts digest to 9305fe4 2025-06-08 17:10:20 +00:00
renovate[bot]
50aed8fe37 chore(deps): update data-mesher digest to 24b49db 2025-06-08 16:50:16 +00:00
Luis Hebendanz
7358a4c737 Merge pull request 'clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser' (#3883) from Qubasa/clan-core:test_for_deploy_info into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3883
2025-06-06 23:02:45 +00:00
Qubasa
2ca3b5d698 clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser 2025-06-07 00:51:24 +02:00
Luis Hebendanz
d38fc3cb35 Merge pull request 'fix the infoboxes not rendering correctly' (#3885) from RuboGubo/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3885
2025-06-06 21:34:08 +00:00
RuboGubo
691f35739d fix the infoboxes not rendering correctly 2025-06-06 20:54:14 +01:00
Mic92
e5127ea4e6 Merge pull request 'cli: fix buildHost source upload destination' (#3884) from clan-core-update-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3884
2025-06-06 13:06:54 +00:00
Jörg Thalheim
9fecd0cc47 cli: fix buildHost source upload destination
Sources were being uploaded to target host instead of build host,
causing nixos-rebuild to fail with "no such file or directory".
2025-06-06 14:51:12 +02:00
Mic92
5c0f192a77 Merge pull request 'facts: Add deprecation warning' (#3851) from kenji/clan-core:ke-deprecation-warning-facts into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3851
2025-06-06 12:09:52 +00:00
Mic92
37e855be76 Merge pull request 'Expose all clanServices/<subfolder>/flake-module.nix' (#3874) from auto-import-all-services into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3874
2025-06-06 12:09:40 +00:00
Mic92
341bdd5e8f Merge pull request 'Add a note about giving the Zerotier network a better name' (#3876) from jfly/clan-core:add-note-about-vpn-name into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3876
2025-06-06 12:09:11 +00:00
lassulus
c4bb842806 Merge pull request 'fix select escaping' (#3857) from lassulus/test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3857
2025-06-06 10:58:14 +00:00
renovate[bot]
e46b0ef520 chore(deps): update disko digest to 6d06f63 2025-06-06 09:20:10 +00:00
renovate[bot]
8d66f5e9f9 chore(deps): update nix-darwin digest to 1934680 2025-06-06 08:30:19 +00:00
lassulus
795d722461 select: fix error message showing nonsense 2025-06-06 10:12:15 +02:00
lassulus
fe7c618ae5 select: fix non escaped ' 2025-06-06 10:12:15 +02:00
renovate[bot]
a7ab21ffa2 chore(deps): update data-mesher digest to 5e87f09 2025-06-06 08:00:24 +00:00
renovate[bot]
68d4fcfa43 chore(deps): update treefmt-nix digest to a05be41 2025-06-06 07:40:11 +00:00
pinpox
d92757ffa5 Merge branch 'main' into auto-import-all-services 2025-06-06 07:39:23 +00:00
renovate[bot]
1fc1f05d7f chore(deps): update nix-darwin digest to 9753a87 2025-06-06 07:00:14 +00:00
renovate[bot]
cf8e011b04 chore(deps): update disko digest to d74db62 2025-06-06 02:40:11 +00:00
Michael Hoang
9d96c3ab97 Merge pull request 'cli: don't generate a sops key that is world readable' (#3877) from push-ytvoytptyzrz into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3877
2025-06-06 02:30:48 +00:00
Michael Hoang
9479f33f6e cli: don't generate a sops key that is world readable
Fixes https://git.clan.lol/clan/clan-core/issues/3808
2025-06-06 12:15:19 +10:00
Jeremy Fleischman
afefac3ac1 Add a note about giving the Zerotier network a better name
It's *very* easy to miss the "default" in the following code snippet.

It's quite useful to have a non-"default" Zerotier network name, for
example, when configuring data-mesher, you need to specify the
`network.interface` setting.
2025-06-05 13:21:48 -07:00
pinpox
68d3712078 Expose all clanServices/<subfolder>/flake-module.nix 2025-06-05 20:28:55 +02:00
pinpox
4592eeb0b8 Merge pull request 'Expose importer module' (#3873) from expose-importer-service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3873
2025-06-05 18:11:44 +00:00
pinpox
8642ee7b5f Expose importer module 2025-06-05 19:57:19 +02:00
kenji
3bdfd86fdf Merge pull request 'zerotier: Allow the controller to accept external Ips' (#3871) from kenji/clan-core:ke-zerotier-allow-external-ips into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3871
2025-06-05 16:53:46 +00:00
a-kenji
7b0ffe7e5c zerotier: Allow the controller to accept external Ips
Allow the controller to accept external zerotier Ips into the network
through declarative settings.

Closes:	#3787
2025-06-05 16:53:46 +00:00
pinpox
cd4e39151d Merge pull request 'clanServices/importer: fix manifest name' (#3872) from migrate-importer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3872
2025-06-05 16:49:06 +00:00
pinpox
e376702816 fix manifest name 2025-06-05 18:37:15 +02:00
pinpox
21fb085454 Merge pull request 'Migrate Importer module' (#3854) from migrate-importer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3854
Reviewed-by: Luis Hebendanz <consulting@qube.email>
2025-06-05 16:29:37 +00:00
pinpox
4b2102bd7f wait for mycelium port 2025-06-05 18:03:59 +02:00
pinpox
b2e8009889 Add readme for clanServices/importer 2025-06-05 17:49:22 +02:00
pinpox
1e6a21ec63 migrate importer module 2025-06-05 17:49:22 +02:00
Luis Hebendanz
750660ca9c Merge pull request 'clan_lib: Fix quoting issues' (#3870) from Qubasa/clan-core:fix_quoting_issues into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3870
2025-06-05 15:41:04 +00:00
kenji
4206c58dae Merge pull request 'Open port for localsend' (#3869) from localsend-open-fw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3869
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-06-05 15:33:11 +00:00
Qubasa
9cec635fdc clan_lib: Fix quoting issues 2025-06-05 17:24:36 +02:00
pinpox
cd107d5ff2 Open port for localsend 2025-06-05 17:19:45 +02:00
kenji
42d58c3c97 Merge pull request 'zerotier: Emphasize that moons are optional' (#3868) from kenji/clan-core:ke-zerotier-documentation-expand into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3868
2025-06-05 14:07:47 +00:00
a-kenji
99fb740f99 zerotier: Emphasize that moons are optional 2025-06-05 15:56:05 +02:00
kenji
3d39ab91bc Merge pull request 'zerotier: Add a usage example to the documentation' (#3867) from kenji/clan-core:ke-zerotier-documentation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3867
2025-06-05 13:47:25 +00:00
a-kenji
9f1c660a4f zerotier: Add a usage example to the documentation 2025-06-05 15:28:01 +02:00
kenji
801b90025d Merge pull request 'Migrate localsend to clanServices' (#3866) from migrate-localsend into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3866
2025-06-05 13:26:06 +00:00
pinpox
802fd13954 Fix manifest.name 2025-06-05 15:14:15 +02:00
pinpox
17731ad06f Add README 2025-06-05 14:54:27 +02:00
pinpox
0d8ccf25b6 Add roles directory 2025-06-05 13:27:55 +02:00
pinpox
ef4caa94e7 Migrate localsend to clanServices 2025-06-05 12:49:51 +02:00
pinpox
e30522cdad Merge pull request 'Clean up checks' (#3853) from cleanup-checks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3853
2025-06-05 10:40:55 +00:00
renovate[bot]
d7b9466153 chore(deps): update disko digest to a4f7deb 2025-06-05 02:30:11 +00:00
Johannes Kirschbauer
e24a197062 Chore(specific_machine_dir): use protocol to avoid direct dependency on machine class 2025-06-04 20:51:27 +02:00
Johannes Kirschbauer
8261ff09cc Chore(api): narrow down get_machine
Dont require the user to pass the machine into the same getter function
The workflow contradicts itself here
2025-06-04 20:38:45 +02:00
hsjobeki
22db6ace21 Merge pull request 'Feat(jsonschema): simplify isRequired, look into default and defaultText' (#3861) from json-schema into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3861
2025-06-04 18:34:40 +00:00
Johannes Kirschbauer
e8608f5af3 feat(jsonschema): filter out $exportedModuleInfo by default 2025-06-04 20:22:54 +02:00
Johannes Kirschbauer
cdaa35ca5f feat(jsonschema): remove 'default' if 'defaultText' is present
default is likely to contain an error thunk if defaultText is set
including it into $exportedModuleInfo makes it non-serializable
2025-06-04 20:22:32 +02:00
Johannes Kirschbauer
f99ddab70f Feat(jsonschema): simplify isRequired, look into default and defaultText 2025-06-04 19:57:39 +02:00
Luis Hebendanz
33f3f36742 Merge pull request 'clan-app: Catch method not found error in api' (#3860) from Qubasa/clan-core:clan_app_fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3860
2025-06-04 16:28:24 +00:00
Qubasa
77ea3409b0 clan-app: Catch method not found error in api 2025-06-04 18:16:58 +02:00
kenji
44d6f0eef2 Merge pull request 'zerotier: Simplify endpoint configuration for moons' (#3859) from kenji/clan-core:ke-zerotier-option-moon into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3859
2025-06-04 15:09:48 +00:00
a-kenji
d32b873dfc zerotier: Simplify endpoint configuration for moons 2025-06-04 16:46:39 +02:00
kenji
f5782e2bcf Merge pull request 'zerotier: Get settings from the instance' (#3855) from kenji/clan-core:ke-zerotier-settings into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3855
2025-06-04 13:17:46 +00:00
a-kenji
d6918efbc7 zerotier: Get settings from the instance 2025-06-04 13:17:46 +00:00
kenji
b2c41fbd38 Merge pull request 'Make IPv4 address optional in localsend module' (#3856) from optional-localsend-ipv4 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3856
2025-06-04 13:14:26 +00:00
pinpox
509274c90e cleanup checks/flake-module.nix 2025-06-04 14:59:30 +02:00
pinpox
20ecec156b Make ipv4Addr optional in localsend module 2025-06-04 14:53:04 +02:00
hsjobeki
dbae114233 Merge pull request 'docs(service-modules): add description and docs for options' (#3848) from doc-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3848
2025-06-04 12:44:32 +00:00
kenji
3f2dfdfd05 Merge pull request 'Migrate mycelium from clanModule to clanService' (#3852) from migrate-mycelium into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3852
2025-06-04 12:34:26 +00:00
Johannes Kirschbauer
e4e39f4b86 Fix(tests/inventory): fix test by adding passtrhough
Since nixosModule is not inspectable during unit test
2025-06-04 14:30:12 +02:00
Johannes Kirschbauer
c9398fab12 Feat(clanServices): expose all other instance options than nixosModule
This is usefull for augmenting the perInstance module
2025-06-04 14:29:36 +02:00
pinpox
84c1cb20be Migrate mycelium from clanModule to clanService 2025-06-04 14:10:32 +02:00
pinpox
7b44e68280 Merge pull request 'Re-introduce clanModules/*/default.nix for backward compatibility' (#3850) from add-module-default-nix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3850
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-06-04 11:22:53 +00:00
a-kenji
dd330f10c1 facts: Add deprecation warning 2025-06-04 13:21:09 +02:00
pinpox
ce1c1747cf Apply suggestions 2025-06-04 13:12:28 +02:00
pinpox
951cf4ec3d Merge pull request 'Remove Golem-provider module' (#3847) from migrate-golemprovider into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3847
2025-06-04 11:09:35 +00:00
pinpox
de5b988345 Re-introduce clanModules/*/default.nix for backward compatibility 2025-06-04 13:05:27 +02:00
pinpox
fe6c3a7ef9 Remove yagna package and golem-provider 2025-06-04 12:55:46 +02:00
pinpox
f1d7b915b3 Simplify and tidy up golem-provider module 2025-06-04 12:55:46 +02:00
Johannes Kirschbauer
f6c5113394 docs: expose clan service authoring interface 2025-06-04 12:43:03 +02:00
Johannes Kirschbauer
04106b24d2 docs(service-modules): add description and docs for options 2025-06-04 12:40:37 +02:00
kenji
09f5a108be Merge pull request 'zerotier: Migrate from clanModule to clanServices' (#3820) from kenji/clan-core:ke-migrate-clan-module-zerotier into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3820
2025-06-04 10:37:35 +00:00
a-kenji
6548934997 !fixup: Remove ', because it breaks nix-select 2025-06-04 12:23:53 +02:00
Mic92
2219b9e8a6 Merge pull request 'Add warning note for users on cloud machines' (#3806) from RuboGubo/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3806
2025-06-04 10:09:19 +00:00
a-kenji
517cb98ac5 zerotier: Migrate from clanModule to clanServices
This migrates zerotier from clanModules to clanServices.
This is a graceful migration and does not yet disables any of the
clanModule functionality.
2025-06-04 11:04:51 +02:00
hsjobeki
75b7e26817 Merge pull request 'Fix(docs): fix broken link to decision' (#3844) from doc-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3844
2025-06-04 08:34:37 +00:00
Johannes Kirschbauer
f3a8a6454b Fix(docs): fix broken link to decision 2025-06-04 09:11:02 +02:00
lassulus
15b4646547 Merge pull request 'zerotier: fix targetHost' (#3842) from connectivity_by_default_fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3842
2025-06-04 06:58:40 +00:00
lassulus
e89fb92f52 zerotier: fix targetHost 2025-06-04 08:46:01 +02:00
renovate[bot]
4ef6e093e5 Update nix-darwin digest to fa6120c 2025-06-04 05:50:11 +00:00
renovate[bot]
e0a175f5a6 Update nix-darwin digest to d46a072 2025-06-04 01:30:11 +00:00
pinpox
68fc2e25af Merge pull request 'Migrate heisenbridge from clanModule to clanService' (#3837) from migrate-heisenbridge into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3837
2025-06-04 00:56:42 +00:00
pinpox
50213caa68 Migrate heisenbridge from clanModule to clanService 2025-06-04 02:45:41 +02:00
pinpox
f9b5f85dc4 Merge pull request 'Migrate garage from clanModule to clanService' (#3836) from migrate-garage into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3836
2025-06-03 23:43:58 +00:00
pinpox
0a0ed236ad Migrate garage from clanModule to clanService 2025-06-04 01:29:52 +02:00
pinpox
15f5de5bcd Merge pull request 'Migrate ergochat from clanModule to clanService' (#3835) from migrate-ergochat into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3835
2025-06-03 22:32:12 +00:00
pinpox
2d09e65ff4 migrate ergochat module to clanservice 2025-06-04 00:21:23 +02:00
pinpox
f34c2d0824 Merge pull request 'Migrate auto-upgrade from clanModule to clanService' (#3827) from migrate-auto-upgrade into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3827
2025-06-03 21:40:57 +00:00
pinpox
1d549918e4 Add auto-upgrade.md to docs 2025-06-03 23:31:20 +02:00
pinpox
919648eae5 nix fmt 2025-06-03 23:22:58 +02:00
pinpox
692b2ae738 Migrate auto-upgrade from clanModule to clanService 2025-06-03 23:13:51 +02:00
pinpox
5196755626 Merge pull request 'Migrate deltachat from clanModule to clanService' (#3829) from migrate-deltachat into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3829
2025-06-03 21:12:28 +00:00
pinpox
f1f67b547d Add deltachat.md to docs 2025-06-03 23:02:42 +02:00
pinpox
9912c18262 nix fmt 2025-06-03 22:54:02 +02:00
pinpox
31bfc6eb8e Fix module category 2025-06-03 22:48:57 +02:00
pinpox
11fd796d44 Fix test runner for tests without vars 2025-06-03 22:35:10 +02:00
pinpox
65af5ac5d2 Add test for deltachat clanService 2025-06-03 22:35:10 +02:00
pinpox
260ccb2815 Migrate deltachat from clanModule to clanService 2025-06-03 22:34:03 +02:00
hsjobeki
51b28a9265 Merge pull request 'feat(inventory/instances): add option for extraModules to roles' (#3830) from flake-models into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3830
2025-06-03 18:58:13 +00:00
hsjobeki
cc7ae5eb44 Merge pull request 'Reaply: #3777: fix/machine-detail-view' (#3833) from ui-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3833
2025-06-03 17:19:43 +00:00
Johannes Kirschbauer
82af09443a Chore(ui/taglist): snapshot test 2025-06-03 19:09:43 +02:00
Johannes Kirschbauer
e5c0c1e69c Fix(inventory/extraModules): use more narrow type for better persistence 2025-06-03 18:57:34 +02:00
hsjobeki
63570d60a3 Merge pull request 'chore: delete duplicate inventory models' (#3831) from chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3831
2025-06-03 16:49:40 +00:00
hsjobeki
1a55e0abf5 Merge pull request 'iwd: fix deprecation spam' (#3832) from DavHau-dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3832
2025-06-03 16:47:27 +00:00
hsjobeki
ea8865e22b Reaply: #3777: fix/machine-detail-view 2025-06-03 18:42:47 +02:00
hsjobeki
a45dba724e Merge pull request 'Typography component V2' (#3797) from ui/typography into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3797
2025-06-03 16:36:19 +00:00
Johannes Kirschbauer
a192ab4910 Fix(docs): dont link to assumed successor 2025-06-03 18:35:00 +02:00
Johannes Kirschbauer
bbbc13c973 Fix(tests/inventory): fix test assertions due to change in the exported structure 2025-06-03 18:30:04 +02:00
Johannes Kirschbauer
43e85b5482 Chore: update clan nix_models 2025-06-03 18:18:12 +02:00
Johannes Kirschbauer
a419e49bb9 Fix(classgen): support listOf union 2025-06-03 18:18:02 +02:00
Johannes Kirschbauer
682da0e396 feat(inventory/instances): add option for extraModules to roles 2025-06-03 18:17:16 +02:00
Johannes Kirschbauer
2ff09100e5 chore: delete duplicate inventory models 2025-06-03 17:52:07 +02:00
Johannes Kirschbauer
5601423ed5 chore(inventory/instances): add forward all role attributes to the service 2025-06-03 17:38:02 +02:00
Johannes Kirschbauer
9c2bf0bbfe feat(inventory/instances): map over all machines and return lazy attributes 2025-06-03 17:37:04 +02:00
lassulus
39d6a89c80 Merge pull request 'zerotier: set targetHost if var is generated' (#3823) from connectivity_by_default_hack into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3823
2025-06-03 13:53:28 +00:00
RuboGubo
5e43876f8e Merge branch 'main' of git.clan.lol:RuboGubo/clan-core 2025-06-03 14:33:12 +01:00
RuboGubo
2f0714770a remove unnecessary note and re-work requirements 2025-06-03 14:31:34 +01:00
DavHau
a858813f48 Merge pull request 'makeTestClan: simplify - move parameters into module' (#3825) from DavHau/clan-core:emergency into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3825
2025-06-03 12:54:09 +00:00
DavHau
6d1a3673ce iwd: fix deprecation spam
use config.warnings instead of lib.warn
2025-06-03 19:38:10 +07:00
DavHau
01737d2bf7 clan tests: convert makeTestClan to a module
Let's not put yet another wrapper around runTest, instead expose our logic as a module that can be imported into any nixos-vm-test
2025-06-03 19:38:02 +07:00
DavHau
a0cbc815e8 makeTestClan: simplify - move parameters into module
... in preparation of removing the makeTestClan wrapper and make this a module instead that can be imported into any test.
2025-06-03 19:38:02 +07:00
DavHau
286ac97063 Revert "Merge pull request 'fix/machine-detail-view' (#3777) from fix/machine-detail-view into main"
This reverts commit c08a9dc1ad, reversing
changes made to c4312bfa18.
2025-06-03 19:35:19 +07:00
RuboGubo
354ba3df70 Add warning note for users on cloud machines 2025-06-03 12:24:54 +00:00
Mic92
1ed2ff77f0 Merge pull request 'fix buildhost re-using control socket for updates' (#3824) from build-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3824
2025-06-03 12:21:22 +00:00
hsjobeki
c08a9dc1ad Merge pull request 'fix/machine-detail-view' (#3777) from fix/machine-detail-view into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3777
2025-06-03 12:10:21 +00:00
Jörg Thalheim
89b436b8a1 fix buildhost re-using control socket for updates
this is actually a serious issue because it also would result doing ssh
to the wrong host: https://git.clan.lol/clan/clan-core/issues/3822
2025-06-03 14:01:49 +02:00
lassulus
d108262b47 zerotier: set targetHost if var is generated 2025-06-03 12:16:09 +02:00
Michael Hoang
c4312bfa18 Merge pull request 'cli: allow using commands from local flakerefs for debugging' (#3819) from push-quvsovsorszu into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3819
2025-06-03 04:20:58 +00:00
Michael Hoang
10b89fe8fd cli: allow using commands from local flakerefs for debugging 2025-06-03 14:07:45 +10:00
Luis Hebendanz
0da94c27ca Merge pull request 'Fix test_create.py' (#3818) from Qubasa/clan-core:minimized-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3818
2025-06-02 15:08:00 +00:00
Luis Hebendanz
710676ad9b Merge pull request 'inventory: Add buildHost argument' (#3817) from Qubasa/clan-core:minimized into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3817
2025-06-02 15:07:38 +00:00
pinpox
19b48b8c82 Merge pull request 'Migrate borgbackup to clan Services' (#3711) from migrate-borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3711
2025-06-02 15:07:05 +00:00
pinpox
988e0825ed Update clan-core-for-checks 2025-06-02 16:19:06 +02:00
pinpox
00313723e2 Update hash 2025-06-02 16:16:17 +02:00
pinpox
13a9b17198 modules/borgbackup: migrate to clanServices
Migrates the borgbackup module to clanServices, preserving it's original
configuration syntax and functionality
2025-06-02 16:12:37 +02:00
Qubasa
bd7a5694e2 clan-cli: Fix test_create::test_clan_create_api 2025-06-02 15:39:50 +02:00
Qubasa
27791477b1 inventory: Add buildHost argument 2025-06-02 14:52:13 +02:00
renovate[bot]
fde6887754 chore(deps): lock file maintenance 2025-06-02 03:00:12 +00:00
renovate[bot]
c4e6b89e25 chore(deps): lock file maintenance 2025-06-02 01:00:23 +00:00
renovate[bot]
e3941a1b7b chore(deps): lock file maintenance 2025-06-02 00:40:41 +00:00
renovate[bot]
23fd87f144 chore(deps): update data-mesher digest to fcb19d9 2025-06-02 00:20:12 +00:00
renovate[bot]
9ec5e4419e chore(deps): update flake-parts digest to 49f0870 2025-06-01 23:50:10 +00:00
RuboGubo
d4b36d9d90 Add warning note for users on cloud machines 2025-05-31 20:10:10 +01:00
DavHau
6b1340d775 iwd: fix typo in deprecation message 2025-05-31 17:58:44 +07:00
DavHau
2b8a7c025f Merge pull request 'clanModules/iwd: deprecate gracefully' (#3804) from DavHau/clan-core:vars2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3804
2025-05-31 10:55:27 +00:00
DavHau
810d9f8122 deprecate iwd module gracefully 2025-05-31 17:46:07 +07:00
DavHau
dad846aa0b services/wifi: rename ssid -> network-name 2025-05-31 17:34:47 +07:00
DavHau
40b39faf70 serivces/wifi: make generator names generic
rename from iwd.<name> to wifi.<name>
2025-05-31 17:34:40 +07:00
DavHau
4922ff9ddc Merge pull request 'tests: actually execute vars checks in CI' (#3803) from DavHau/clan-core:vars2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3803
2025-05-31 10:27:36 +00:00
DavHau
65d9ef02dc generate-test-vars: fake prompt inputs
Use fake prompt inputs when generating vars for testing
2025-05-31 17:14:26 +07:00
DavHau
d27834b565 tests: actually execute vars checks in CI 2025-05-31 16:16:09 +07:00
clan-bot
3c9c7341c1 Merge pull request 'Update Clan Core for Checks' (#3799) from update-clan-core-for-checks into main 2025-05-31 07:37:42 +00:00
DavHau
e81771a724 tests: test vars generation for all clan service tests 2025-05-31 12:17:52 +07:00
DavHau
7ecc142ba9 sops: initialize age_plugins early
This avoids re-initializing the Flake object deep in the tree, which in turn leads to issue when overriding the Flake for testing, eg the URl would reset.
2025-05-31 11:27:17 +07:00
DavHau
54b13054ca vars: fix spelling in docs 2025-05-31 11:13:17 +07:00
clan-bot
c6ba82cfab Update pinned clan-core for checks 2025-05-31 02:51:24 +00:00
Mic92
1523ac18c9 Merge pull request 'Add inputs to specialArgs and make templates use it' (#3798) from templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3798
2025-05-30 18:33:33 +00:00
Jörg Thalheim
646a3d56ce add inputs to specialArgs and make templates use it. 2025-05-30 19:53:12 +02:00
Jörg Thalheim
9d62001a27 templates: unify specialArgs across examples 2025-05-30 19:22:45 +02:00
Brian McGee
8997f61ef8 feat(ui): Typography V2 2025-05-30 14:58:50 +01:00
Brian McGee
7f436d1a8b feat(ui): update border and background colors
To match latest design.
2025-05-30 13:46:57 +01:00
Brian McGee
8e155dd164 feat(ui): update primary colors
To match latest design.
2025-05-30 13:46:56 +01:00
Brian McGee
bbe14dbb3b chore(ui): setup base for Typography V2
Also removes Button stories for V1 component.
2025-05-30 13:46:55 +01:00
clan-bot
c375a39137 Merge pull request 'Update Clan Core for Checks' (#3781) from update-clan-core-for-checks into main 2025-05-30 10:41:20 +00:00
Mic92
5a8f8fc0bf Merge pull request 'container-test: better error message for nsenter' (#3794) from container-test-improv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3794
2025-05-30 10:35:02 +00:00
clan-bot
a3cb5f5159 Update pinned clan-core for checks 2025-05-30 10:29:19 +00:00
Jörg Thalheim
1a1898b5f1 container-test: better error message for nsenter 2025-05-30 12:27:51 +02:00
brianmcgee
9341c14997 Merge pull request 'feat(ui): enable storybook snapshot tests' (#3789) from feat/storybook-snapshot-tests into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3789
2025-05-30 10:22:10 +00:00
Mic92
5ef82a1367 Merge pull request 'Revert "services/wifi: rename ssid -> network-name"' (#3796) from revert-wifi-change into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3796
2025-05-30 10:15:45 +00:00
Jörg Thalheim
2154af7f95 Revert "services/wifi: rename ssid -> network-name"
This reverts commit e45e994b83.
2025-05-30 12:09:46 +02:00
Jörg Thalheim
681a67f531 Revert "serivces/wifi: make generator names generic"
This reverts commit 2a347fb406.
2025-05-30 12:09:30 +02:00
Brian McGee
543cfd4fc6 fix(ui): disable storybook devshell and package on Darwin 2025-05-30 11:06:14 +01:00
Brian McGee
807b9fd61f feat(ui): enable storybook snapshot tests
- adds a process-compose namespace for running `storybook` and `luakit` together to replicate the `webkit`-based rendering that happens inside of `webview`
- adds some helper scripts for running storybook tests and updating snapshots, with documentation in the README.
- adds a `clan-app-ui-storybook` package which builds and tests the storybook, checking for rendering changes

Currently, we’re only doing markup-based snapshot tests. We’re also using headless chromium for the tests by default as I couldn't get webkit to work in the nix build.

As we’re only markup-based for the time being, this should be ok. But eventually I'd like to get it working with webkit.
2025-05-30 11:06:14 +01:00
Mic92
d1ad8c6c87 Merge pull request 'container-test: disable UsePam for ssh' (#3795) from use-pam into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3795
2025-05-30 10:05:08 +00:00
Jörg Thalheim
795ace408a container-test: disable UsePam for ssh
doesn't work without setuid, which we currently do not support.
2025-05-30 11:53:20 +02:00
Mic92
aba30e156a Merge pull request 'vars: add restartUnits option' (#3784) from vars-userborn into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3784
2025-05-30 09:45:17 +00:00
hsjobeki
672ef7c4d2 Merge pull request 'Tests(inventoryStore): add tests for intersecting nix/json lists' (#3783) from flake-models into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3783
2025-05-30 08:35:13 +00:00
Johannes Kirschbauer
c42d981285 Test(InventoryPersistence): improve error message 2025-05-30 10:23:57 +02:00
DavHau
e45e994b83 services/wifi: rename ssid -> network-name 2025-05-29 20:21:09 +07:00
DavHau
2a347fb406 serivces/wifi: make generator names generic
rename from iwd.<name> to wifi.<name>
2025-05-29 20:06:19 +07:00
Mic92
610253d45e Merge pull request 'vars upload: also add become_root' (#3788) from sudo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3788
2025-05-28 18:45:34 +00:00
Jörg Thalheim
229401e6ef vars upload: also add become_root 2025-05-28 20:35:45 +02:00
Mic92
0d7c7a8856 Merge pull request 'add sudo_askpass_proxy' (#3642) from sudo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3642
2025-05-28 18:32:16 +00:00
Jörg Thalheim
e733619139 test_upload_single_file: add missing ssh_control_master 2025-05-28 20:25:53 +02:00
Jörg Thalheim
14324a059b move test_ssh_remote to remote_test 2025-05-28 20:13:48 +02:00
Jörg Thalheim
7314f6b2ff vars: add restartUnits option
For secrets not part of the nix store there is no other way in NixOS to
restart a service after the secret is updated. One example is changing
password in userborn, which doesn't run as a activation script but as a
systemd service.
2025-05-28 16:44:19 +02:00
Jörg Thalheim
ac31b20522 re-store controllmaster in various places where it got removed. 2025-05-28 16:21:30 +02:00
Jörg Thalheim
75dd389c2c no longer require controlmaster for interactive ssh
we only run one ssh command, so control master is not needed
2025-05-28 16:21:30 +02:00
Jörg Thalheim
31274212a8 ssh/remote: Improve error message if _control_path_dir is not set 2025-05-28 16:21:30 +02:00
Jörg Thalheim
e0ebea7eb8 update/upload_sources remove ssh_control_master again from upload_sources 2025-05-28 16:21:30 +02:00
Jörg Thalheim
f06313d5b2 add sudo_askpass_proxy 2025-05-28 16:21:30 +02:00
Jörg Thalheim
5a560ff219 ssh/remote: make sure we also cleanup clan-ssh in the error case 2025-05-28 16:21:30 +02:00
Jörg Thalheim
91406b2016 remove unused method 2025-05-28 16:21:30 +02:00
Johannes Kirschbauer
1582402634 Tests(inventoryStore): add tests for intersecting nix/json lists 2025-05-28 15:39:52 +02:00
hsjobeki
2efb4994a6 Merge pull request 'Tests(inventoryStore): add fixture, make extensible' (#3782) from flake-models into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3782
2025-05-28 13:12:19 +00:00
Johannes Kirschbauer
dc94749647 Tests(inventoryStore): add fixture, make extensible 2025-05-28 15:06:17 +02:00
hsjobeki
53244303f6 Merge pull request 'chore(nix_models): use exported clan models' (#3773) from flake-models into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3773
2025-05-28 12:25:07 +00:00
Johannes Kirschbauer
2da7ebaa21 Fix(machines/create): use 'InventorySnapshot' as init argument
Inventory as a model is generally not json serializable
InventorySnapshot is the return value of InventoryStore.{read, write}
And should be used in API calls, because the other fields might not be compatible in general
2025-05-28 14:09:45 +02:00
Johannes Kirschbauer
e57c8f6f9a feat(InventoryStore): return a restricted view of the inventory 2025-05-28 14:04:34 +02:00
Johannes Kirschbauer
467aa546c4 Chore: update clan nix_models 2025-05-28 14:03:23 +02:00
Johannes Kirschbauer
19dbc0ff73 chore(nix_models): migrate import to use exported clan models 2025-05-28 14:03:22 +02:00
Johannes Kirschbauer
8eb2ad6c6d feat(nix_models): replace inventory model by holistic clan model 2025-05-28 14:02:43 +02:00
Johannes Kirschbauer
111983b508 feat(classgen): make type generation more predictable across 2025-05-28 14:02:43 +02:00
Johannes Kirschbauer
e2e4344d83 fix(clan/interface): minor fixes 2025-05-28 14:02:43 +02:00
hsjobeki
51c2f72174 Merge pull request 'Tests(clan_lib): enable clan_lib pytests not marked with_core' (#3779) from inventory-0 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3779
2025-05-28 09:45:56 +00:00
Johannes Kirschbauer
5271b5c599 Fix(inventoryStore): use 'nix_eval' wrapper to set the store correct 2025-05-28 11:34:16 +02:00
Johannes Kirschbauer
f6c869dbae Fix(clan_cli): filter tests files from source 2025-05-28 11:34:12 +02:00
Johannes Kirschbauer
673b6bb31f Fix(tests): fix failing pytests 2025-05-28 11:01:54 +02:00
Johannes Kirschbauer
6f0a4549a5 Tests(inventoryStore): fixup tests to run in ci 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
c6c43ba737 Feat(inventoryStore): add possibility to turn off output filtering 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
6debc2ddf9 Tests(clan_lib): enable clan_lib pytests not marked with_core 2025-05-28 10:42:47 +02:00
hsjobeki
e374da632e Merge pull request 'refactor(persist/utils): rename apply_patch to 'set_value_by_path'' (#3780) from rename-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3780
2025-05-28 08:19:10 +00:00
Johannes Kirschbauer
dac30c4dd7 refactor(persist/utils): rename apply_patch to 'set_value_by_path' 2025-05-28 10:16:48 +02:00
Brian McGee
dfd5e677ec chore: fmt 2025-05-28 08:24:03 +01:00
Brian McGee
4b7fc9e544 fix(ui): use asterisk html entity code
It wasn't rendering for me when using "*".
2025-05-28 08:20:45 +01:00
Brian McGee
03db7d1fbc feat(ui): improve tags display in machine detail
Also introduces a new TagList component.
2025-05-28 08:20:45 +01:00
Brian McGee
c36cf800bb fix(ui): normalize font sizes in machine detail view 2025-05-28 08:20:44 +01:00
Brian McGee
465fd14bfe feat(ui): refine Button stories
Add separate examples of start and end icon
2025-05-28 08:20:44 +01:00
Brian McGee
52ca7017d1 fix(ui): add default css in storybook preview 2025-05-28 08:20:43 +01:00
hsjobeki
61a587b382 Merge pull request 'Feat(inventory): remove legacy action functions' (#3778) from inventory-0 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3778
2025-05-27 16:09:16 +00:00
Johannes Kirschbauer
ec6fddce03 Fix(test): migrate machine cli command tests to use the new functions 2025-05-27 17:57:08 +02:00
Johannes Kirschbauer
c293d813cc Feat(inventoryStore): add 'invalidate_cache' to the Flake protocol 2025-05-27 17:56:35 +02:00
Johannes Kirschbauer
3ed3cdddc9 Feat(inventory): remove legacy action functions
Inventory should only and always be accessed through the inventory store.
Manually reading and writing to the json file is highly insecure
2025-05-27 17:20:04 +02:00
hsjobeki
ec17a785af Merge pull request 'Fix: configure deferred setting module path correctly' (#3776) from fix-3 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3776
2025-05-27 14:46:09 +00:00
Johannes Kirschbauer
38b83c41cf Fix: configure deferred setting module path correctly 2025-05-27 16:31:54 +02:00
Mic92
055b1eb413 Merge pull request 'chore(deps): update nix-darwin digest to 44a7d0e' (#3775) from renovate/nix-darwin-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3775
2025-05-27 14:23:32 +00:00
Mic92
d74ddf7334 Merge pull request 'docs: clarify when to override the nixpkgs input of clan-core' (#3774) from push-kylqnyonxntl into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3774
2025-05-27 14:23:21 +00:00
renovate[bot]
55923023cf chore(deps): update nix-darwin digest to 44a7d0e 2025-05-27 14:10:10 +00:00
Michael Hoang
e0c1cb47e7 docs: clarify when to override the nixpkgs input of clan-core
To match 30987ee5b2/docs/site/guides/migrations/migration-guide.md (L54-L55)
2025-05-27 22:48:08 +10:00
Michael Hoang
30987ee5b2 Merge pull request 'docs: point users towards passing in self to buildClan' (#3772) from push-wluozlqruukw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3772
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-05-27 12:34:27 +00:00
Michael Hoang
eadd59ff21 docs: point users towards passing in self to buildClan 2025-05-27 13:49:14 +10:00
clan-bot
a62ac116d8 Merge pull request 'Update Clan Core for Checks' (#3771) from update-clan-core-for-checks into main 2025-05-27 03:01:12 +00:00
clan-bot
2422e0c8e1 Update pinned clan-core for checks 2025-05-27 02:51:23 +00:00
hsjobeki
afa8d62d48 Merge pull request 'Refactor(lib/inventory): move machine actions into clan_lib/machines/actions.py' (#3770) from chores-3 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3770
2025-05-26 16:05:26 +00:00
Johannes Kirschbauer
767477cd5c Chore: rename secrets.get_machine to avoid ambiguity 2025-05-26 17:52:46 +02:00
Johannes Kirschbauer
349968c631 Refactor(lib/inventory): move machine actions into clan_lib/machines/actions.py 2025-05-26 17:51:12 +02:00
hsjobeki
d7b111ef0a Merge pull request 'Feat(persist): add support for deferredModule read/write' (#3752) from deferredModule-serde into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3752
2025-05-26 14:18:53 +00:00
Johannes Kirschbauer
8aed51c63e fix(morph/test): temporary workaround for morph test 2025-05-26 16:06:12 +02:00
Johannes Kirschbauer
73d72298cc chore: add todo comments for template logic in create machine 2025-05-26 16:05:20 +02:00
brianmcgee
d389c4dc5d Merge pull request 'feat(ui): introduces storybook' (#3767) from feat/storybook into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3767
2025-05-26 13:55:46 +00:00
kenji
91cf2a54bb Merge pull request 'pkgs/generate-test-vars: Fix build' (#3769) from kenji/clan-core:ke-vars-generator-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3769
2025-05-26 13:48:49 +00:00
a-kenji
322068dad1 pkgs/generate-test-vars: Fix erroneous module import
The machines module lives in the `clan_lib` library.
2025-05-26 15:43:41 +02:00
a-kenji
39995eef39 pkgs/generate-test-vars: Add basic module test
Add a basic module test that can catch breaking changes in module
usage.
2025-05-26 15:41:48 +02:00
kenji
01eff2c6b9 Merge pull request 'clanServices/wifi/tests: Use undeprecated module registration' (#3768) from kenji/clan-core:ke-wifi-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3768
2025-05-26 12:59:01 +00:00
a-kenji
491dd8134a clanServices/wifi/tests: Use undeprecated module registration 2025-05-26 14:44:00 +02:00
DavHau
7e4e083014 Merge pull request 'services/wifi: migrate to NetworkManager' (#3766) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3766
2025-05-26 12:14:08 +00:00
DavHau
f561102ca8 clanModules/wifi: remove module
It was replaces by a service module and experimental anyways
2025-05-26 19:09:20 +07:00
DavHau
6d6a0521ff services/wifi: migrate to NetworkManager 2025-05-26 19:09:20 +07:00
Brian McGee
bf993af56f feat(ui): introduces storybook
- adds the necessary dependencies and configuration for Storybook.
- refactors the `Button` component and adds some stories for it.
2025-05-26 12:56:51 +01:00
brianmcgee
7503784699 Merge pull request 'feat(ui): add a clan context provider' (#3744) from feat/clan-uri-context into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3744
2025-05-26 09:26:07 +00:00
renovate[bot]
1c62c287b7 Update data-mesher digest to f52e3ee 2025-05-26 08:00:31 +00:00
renovate[bot]
a32b3db8e5 Update treefmt-nix digest to 1f3f7b7 2025-05-26 07:40:10 +00:00
clan-bot
04d0087239 Merge pull request 'Update Clan Core for Checks' (#3762) from update-clan-core-for-checks into main 2025-05-26 03:01:06 +00:00
clan-bot
6777baca96 Update pinned clan-core for checks 2025-05-26 02:51:22 +00:00
renovate[bot]
4b44892b47 Update disko digest to a894f28 2025-05-26 02:22:29 +00:00
renovate[bot]
339696da1f Lock file maintenance 2025-05-26 00:20:21 +00:00
renovate[bot]
1644dc66e7 Lock file maintenance 2025-05-26 00:00:32 +00:00
Luis Hebendanz
4aaa985703 Merge pull request 'clan-cli: Fix too long path for socket issue #3756' (#3757) from Qubasa/clan-core:fix_path_to_long into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3757
2025-05-25 20:28:46 +00:00
Qubasa
8a40d46e96 clan-cli: Fix too long path for socket issue #3756 2025-05-25 22:16:51 +02:00
kenji
c7515ab5e9 Merge pull request 'typo' (#3755) from nim65s/clan-core:typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3755
2025-05-25 17:05:30 +00:00
Guilhem Saurel
447a4ecc3e another typo 2025-05-25 18:02:06 +02:00
Guilhem Saurel
df12613ad8 typo 2025-05-25 17:36:14 +02:00
clan-bot
fe39c37c07 Merge pull request 'Update Clan Core for Checks' (#3754) from update-clan-core-for-checks into main 2025-05-25 03:01:27 +00:00
clan-bot
6b8c0ba57a Update pinned clan-core for checks 2025-05-25 02:51:32 +00:00
clan-bot
5f10f5712e Merge pull request 'Update Clan Core for Checks' (#3753) from update-clan-core-for-checks into main 2025-05-24 03:00:43 +00:00
clan-bot
2bf33ea295 Update pinned clan-core for checks 2025-05-24 02:51:23 +00:00
Johannes Kirschbauer
eadc7997cd Fix(machines/create): check if machine is already created 2025-05-23 22:31:06 +02:00
Johannes Kirschbauer
43be58c433 Fix(machines/create): always add 'deploy.targetHost'
Rationale: not passing the value, is equivalent to deleting a value from the inventory store
See: 'delete_by_path'
deploy.targetHost has a default of null (None)
2025-05-23 22:07:09 +02:00
Johannes Kirschbauer
d8a835c7ae test(persist/inventory): add test for adding deferredModule
This feature will allow us to read/write to 'settings' of service
'instances' which are of type deferredModule.
Usually a deferredModule needs to be evaulated, but because we use our
own type, which forces some constraints, we can safely perform read and
write
2025-05-23 21:49:16 +02:00
Johannes Kirschbauer
f746184bf6 fix(persist/delete): delete explizitly 2025-05-23 21:47:12 +02:00
Johannes Kirschbauer
de25fda5b3 fix(tests): use inventory store to interact with the inventory 2025-05-23 21:46:35 +02:00
Johannes Kirschbauer
bb2955d9ad feat(persist/inventory): add transformation and filtering to support deferredModules 2025-05-23 21:45:52 +02:00
Johannes Kirschbauer
467c1e7f28 fixes(persist/util): fix some expected error messages in tests 2025-05-23 21:43:49 +02:00
Johannes Kirschbauer
4c3dcfe8b5 test(persist/util): add test for adding empty submodules 2025-05-23 21:43:09 +02:00
Johannes Kirschbauer
2170235958 refactor(persist/util): improve calc_patches 2025-05-23 21:42:35 +02:00
Johannes Kirschbauer
60bd7bc3ce feat(persist/util): init parent_is_dict
Check if a parent value is of type dict
This utility is helpfull for cross checking of flattened dicts
2025-05-23 21:41:34 +02:00
Johannes Kirschbauer
634b4f8e46 chore(inventory): find_deleted_paths rename variables 2025-05-23 21:40:02 +02:00
Johannes Kirschbauer
8c9e1538fb fix(inventory/store): keep empty dicts as leafs 2025-05-23 21:39:23 +02:00
Johannes Kirschbauer
3974bd1580 test(inventory/store): clean up simple test 2025-05-23 21:38:16 +02:00
Johannes Kirschbauer
ed764a2f0f feat(inventory/store): init path_match utility 2025-05-23 21:36:14 +02:00
lassulus
e5ba0489c4 Merge pull request 'clan_lib flake_test: fix on darwin' (#3750) from clan-lib-darwin-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3750
2025-05-23 10:43:31 +00:00
lassulus
98b0f97d45 clan_lib flake_test: fix on darwin 2025-05-23 12:29:34 +02:00
clan-bot
57cd50ae35 Merge pull request 'Update Clan Core for Checks' (#3749) from update-clan-core-for-checks into main 2025-05-23 03:01:12 +00:00
clan-bot
176b1f94bc Update pinned clan-core for checks 2025-05-23 02:51:24 +00:00
Luis Hebendanz
d4e5a5ef8b Merge pull request 'clan-cli: Move Machine object to clan_lib' (#3747) from Qubasa/clan-core:machine_object into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3747
2025-05-22 17:23:46 +00:00
Qubasa
0ca7600439 clan-cli: Move Machine object to clan_lib 2025-05-22 19:11:19 +02:00
Brian McGee
aa1bbd1180 feat(ui): add a clan context provider
- introduces a new consolidated store with `localStorage` support
- introduces a top-level `ClanProvider` providing access to `activeClanURI` and `clanURIs`
- redirects to `/welcome` if `activeClanURI` is `undefined`
- consolidates clan meta querying
- centralises the logic for removal of clan uri's which no longer exist
- fixed some miscellaneous missing `await` calls
2025-05-22 13:24:27 +00:00
Luis Hebendanz
3d6fcd522a Merge pull request 'clan-cli: Fix ctrl+c cancelling tasks' (#3746) from Qubasa/clan-core:fix_ctrl_c into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3746
2025-05-22 13:14:30 +00:00
Qubasa
9b714aa048 clan-cli: Fix ctrl+c cancelling tasks 2025-05-22 15:01:58 +02:00
Luis Hebendanz
1b13296444 Merge pull request 'clan-cli: Rename Host -> Remote move to clan_lib and mark as frozen' (#3726) from Qubasa/clan-core:fix_ui_stuff into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3726
2025-05-22 12:20:55 +00:00
Qubasa
cff5d61f26 clan-cli: Rename Host -> Remote move to clan_lib and mark as frozen 2025-05-22 14:08:27 +02:00
Mic92
7bcb0afae9 Merge pull request 'fix build_host not beeing applied' (#3740) from fix-build-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3740
2025-05-22 11:25:20 +00:00
brianmcgee
e53ce07dc8 Merge pull request 'fix(ui): hot-reload of clan-cli' (#3745) from fix/clan-lib-hot-reload-ui into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3745
2025-05-22 11:01:13 +00:00
Brian McGee
768b94fc75 fix(ui): hot-reload of clan-cli 2025-05-22 11:47:35 +01:00
Michael Hoang
6b1d4adb81 Merge pull request 'docs: misc clean up 2' (#3742) from push-wzkskzxyzkwt into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3742
2025-05-22 04:16:34 +00:00
Michael Hoang
dc108cc27d docs: format code blocks in migration guide 2025-05-22 14:12:40 +10:00
Michael Hoang
dcb9358e51 docs: clean up flake-parts guide 2025-05-22 14:12:40 +10:00
clan-bot
104c05e206 Merge pull request 'Update Clan Core for Checks' (#3741) from update-clan-core-for-checks into main 2025-05-22 03:01:07 +00:00
clan-bot
e5807bfa7e Update pinned clan-core for checks 2025-05-22 02:51:23 +00:00
Jörg Thalheim
0a22218026 fix build_host not beeing applied 2025-05-22 00:22:04 +02:00
hsjobeki
843e1b24be Merge pull request 'Feat(clanLib): init types {uniqueDeferredSerializableModule}' (#3737) from hsjobeki/clan-core:fix-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3737
2025-05-21 18:50:42 +00:00
lassulus
8f98aa854f Merge pull request 'clan-cli: split clan into cli and lib' (#3738) from clan_lib_clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3738
2025-05-21 18:50:08 +00:00
Johannes Kirschbauer
8576016b32 fix(clanLib): propagate clanLib into module apply 2025-05-21 20:44:56 +02:00
lassulus
0e9124d322 clan-cli: split clan into cli and lib 2025-05-21 20:28:41 +02:00
Johannes Kirschbauer
2510b2bb77 Tests(deferred custom module): add more tests, dissallow nested imports 2025-05-21 18:54:07 +02:00
Johannes Kirschbauer
9f298ecb86 Feat(settings): use uniqueDeferredSerializableModule for settings 2025-05-21 18:41:20 +02:00
Johannes Kirschbauer
df0b8cfd45 Feat(clanLib): init types {uniqueDeferredSerializableModule} 2025-05-21 18:41:14 +02:00
hsjobeki
afbb6549a6 Merge pull request 'Test(InventoryPersistence): add persist integration tests' (#3736) from hsjobeki/clan-core:fix-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3736
2025-05-21 16:10:11 +00:00
Johannes Kirschbauer
15ec2067a6 Test(InventoryPersistence): add persist integration tests 2025-05-21 17:55:43 +02:00
Johannes Kirschbauer
b628b12b3e Fix(introspection): 'lazyAttrsOf' needs to get the same handling as 'attrsOf' 2025-05-21 16:45:19 +02:00
Johannes Kirschbauer
74ceb95eb7 Feat(inventoryStore): add FlakeInterface protocol 2025-05-21 16:44:28 +02:00
Michael Hoang
f8cf9fa172 Merge pull request 'docs: misc clean up' (#3735) from push-kpzwvynvlszo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3735
2025-05-21 14:12:47 +00:00
Michael Hoang
5bc6126873 docs: misc clean up 2025-05-22 00:01:01 +10:00
Michael Hoang
f9779322d0 gitignore: drop superfluous **/ 2025-05-22 00:01:01 +10:00
kenji
04ca72f5b5 Merge pull request 'pkgs/clan: Clean select symlink up' (#3734) from kenji/clan-core:ke-fix-clan-cli into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3734
Reviewed-by: lassulus <clanlol@lassul.us>
2025-05-21 13:08:21 +00:00
a-kenji
5be449740e pkgs/clan: Clean select symlink up
If the symlink is not cleaned up this will break builds of the clan cli
from flakes with path references.
2025-05-21 14:18:26 +02:00
lassulus
5dc3d27fb4 Merge pull request 'clan-cli: split backups into cli and lib' (#3733) from clan_lib_backups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3733
2025-05-21 12:16:02 +00:00
DavHau
c45c94e045 GUI: add credentials page (vars)
add it to machine details
2025-05-21 11:47:04 +00:00
lassulus
66f35ae637 clan-cli: split backups into cli and lib 2025-05-21 13:46:35 +02:00
hsjobeki
1c0b383183 Merge pull request 'Fix: don't try to persist 'inventory.instances'' (#3731) from hsjobeki/clan-core:fix-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3731
2025-05-21 10:36:29 +00:00
lassulus
89edfda887 Merge pull request 'clan-cli: clan_cli.inventory -> clan_lib.inventory' (#3730) from clan_lib_inv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3730
2025-05-21 10:33:08 +00:00
lassulus
ce00c63721 clan-cli: clan_cli.bwrap -> clan_lib.bwrap 2025-05-21 12:06:38 +02:00
lassulus
80229c5e77 clan-cli: clan_cli.inventory -> clan_lib.inventory 2025-05-21 12:06:38 +02:00
Johannes Kirschbauer
39b81a17c3 Fix: don't try to persist 'inventory.instances' 2025-05-21 11:42:29 +02:00
hsjobeki
5b80204107 Merge pull request 'Update UI to Node 22 and update dependencies' (#3729) from feat/update-ui-dependencies into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3729
2025-05-21 09:03:27 +00:00
hsjobeki
55b032094f Merge pull request 'Refactor(clan_lib): move serde tests next to serde module' (#3728) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3728
2025-05-21 08:15:11 +00:00
Johannes Kirschbauer
73ab00ac7c chore(clan_lib) add api.serde tests for typed_dict 2025-05-21 10:01:27 +02:00
Johannes Kirschbauer
25e3d27bf2 docs: add doc-string to api serde utilities 2025-05-21 10:00:42 +02:00
Johannes Kirschbauer
d9e4c93509 Refactor(clan_lib): move serde tests next to serde module 2025-05-21 09:36:00 +02:00
hsjobeki
15f0ea616c Merge pull request 'Refactor(docs): consistent structure across references & fix broken cli links' (#3724) from hsjobeki/clan-core:docs-3 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3724
2025-05-21 07:23:16 +00:00
Johannes Kirschbauer
3285efa55d docs: exclude options that are not modules from clan.core submodule index 2025-05-21 09:11:18 +02:00
clan-bot
a3078f4e13 Merge pull request 'Update Clan Core for Checks' (#3727) from update-clan-core-for-checks into main 2025-05-21 03:02:07 +00:00
clan-bot
513d085f59 Update pinned clan-core for checks 2025-05-21 02:52:08 +00:00
Mic92
4eac7ad86d Merge pull request 'docs/macos: replace duplicate section' (#3725) from docs-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3725
2025-05-20 16:53:17 +00:00
Mic92
bfe158c9fa Merge pull request 'fix sudo in clan flash when restoring auto-updates' (#3717) from restore-automount into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3717
2025-05-20 16:49:39 +00:00
Johannes Kirschbauer
188e6d5d16 Docs: add links to submodules 2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
b1054e2ad2 Fix(docs): rename reference to clan.core 2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
db666ce2ce Refactor(docs): consistent structure across references 2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
1c2ee49047 docs: replace remote url by local file links to allow for checking 2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
53dcc4e332 docs: replace outdates reference links to 'guides' in the cli 2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
a9ed972834 docs: fix clan-core should be called clan.core
Consistent with the module name
2025-05-20 18:49:35 +02:00
Johannes Kirschbauer
c34b693a64 docs: consistent clan-core overview 2025-05-20 18:49:35 +02:00
Jörg Thalheim
6dab14c9d4 docs/macos: replace duplicate section 2025-05-20 18:48:36 +02:00
renovate[bot]
0c099f16bb chore(deps): lock file maintenance 2025-05-20 15:30:13 +00:00
hsjobeki
38159d85f7 Merge pull request 'feat(docs,api): expose inventory.instances interface' (#3721) from hsjobeki/clan-core:inventory-services-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3721
2025-05-20 15:29:14 +00:00
Johannes Kirschbauer
228cdfd0e9 Chore(nix_models): update models after refactoring for inventory.instances 2025-05-20 17:10:43 +02:00
hsjobeki
bbeef3d76a Merge pull request 'feat(clanServices): add 'readme' to module manifest' (#3723) from hsjobeki/clan-core:manifest-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3723
2025-05-20 15:07:34 +00:00
Johannes Kirschbauer
d8cb43ae8d feat(clanServices): add 'readme' to module manifest 2025-05-20 17:00:53 +02:00
Brian McGee
d50eac6525 feat(ui): upgrade to nodejs_22 and update dependencies 2025-05-20 15:45:17 +01:00
lassulus
3b29c0e006 Merge pull request 'ADR: init 05-deployment-parameters' (#3722) from adr-deployment into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3722
2025-05-20 14:26:59 +00:00
lassulus
e5f38db60f ADR: init 05-deployment-parameters 2025-05-20 16:22:52 +02:00
lassulus
c624163581 Merge pull request 'move templates, custom_logger, async_run and jsonrpc to clan_lib' (#3720) from clan_lib_misc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3720
2025-05-20 14:20:44 +00:00
Johannes Kirschbauer
40e34d9307 feat(docs,api): expose inventory.instances interface" 2025-05-20 16:10:32 +02:00
Johannes Kirschbauer
6863ce136f chore(inventory/tags): remove unsupported settings from tags interface 2025-05-20 16:10:32 +02:00
Johannes Kirschbauer
bd92170bed feat(classgen): add 'instances' as top level key 2025-05-20 16:10:32 +02:00
Johannes Kirschbauer
d842a13789 feat(classgen): defer NotRequired type wrapper 2025-05-20 16:10:32 +02:00
Johannes Kirschbauer
42de68966b feat(classgen): add support for unknown types 2025-05-20 16:10:25 +02:00
lassulus
68183634bb clan_cli flake_test: fix on non sandboxed runs 2025-05-20 16:08:02 +02:00
lassulus
3457542871 clan-cli: clan_cli.templates -> clan_lib.templates 2025-05-20 16:08:02 +02:00
Johannes Kirschbauer
f6544d1cda Feat(jsonschema): convert deferredModule to unknown 2025-05-20 15:48:28 +02:00
lassulus
131c7ea263 Merge pull request 'ADR: add decision for nix-select' (#3452) from select-adr into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3452
Reviewed-by: hsjobeki <hsjobeki@gmail.com>
2025-05-20 13:43:31 +00:00
lassulus
6b3509c3b1 ADR: add decision for nix-select 2025-05-20 15:26:53 +02:00
lassulus
ec19ef1ec5 clan-cli: clan_cli.custom_logger -> clan_lib.custom_logger 2025-05-20 15:08:02 +02:00
lassulus
00a439999b clan-cli: clan_cli.async_run -> clan_lib.async_run 2025-05-20 15:05:11 +02:00
lassulus
7e63be2976 clan-cli: clan_cli.jsonrpc -> clan_lib.jsonrpc 2025-05-20 15:05:11 +02:00
lassulus
c059eb37ea Merge pull request 'clan-cli: clan_cli.locked_open -> clan_lib.locked_open' (#3719) from clan_lib_locked_open into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3719
2025-05-20 13:01:12 +00:00
lassulus
dc8675fcb6 clan-cli: clan_cli.locked_open -> clan_lib.locked_open 2025-05-20 14:48:50 +02:00
lassulus
545f498881 Merge pull request 'clan-cli: clan_cli.git -> clan_lib.git' (#3718) from clan_lib_git into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3718
2025-05-20 12:46:48 +00:00
lassulus
c55bffa5a5 clan-cli: clan_cli.git -> clan_lib.git 2025-05-20 14:35:14 +02:00
hsjobeki
16112e259c Merge pull request 'Classgen: export field type definitions' (#3715) from hsjobeki/clan-core:inventory-services-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3715
2025-05-20 12:20:07 +00:00
Jörg Thalheim
877107650f fix sudo in clan flash when restoring auto-updates 2025-05-20 14:03:25 +02:00
lassulus
6da64f6f27 Merge pull request 'clan_lib_colors' (#3713) from clan_lib_colors into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3713
2025-05-20 11:59:18 +00:00
Mic92
cdaf0e8c2b Merge pull request 'upload: improve various things' (#3714) from upload into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3714
2025-05-20 11:54:57 +00:00
Mic92
2f370a6d33 Merge pull request 'mypy: ignore clan_lib.nixpkgs' (#3716) from fix-mypy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3716
2025-05-20 11:51:44 +00:00
Johannes Kirschbauer
027ae49449 Chore(formatter): exclude generated classes file 2025-05-20 13:42:18 +02:00
Johannes Kirschbauer
6989899338 Chore: re-generate nix models 2025-05-20 13:41:55 +02:00
Jörg Thalheim
b05c7469ce upload: hide upload command by default 2025-05-20 13:37:46 +02:00
Jörg Thalheim
c5540941a6 cmd/run: dont run logging code unless we have debugging enabled. 2025-05-20 13:37:46 +02:00
Jörg Thalheim
12a5a0d792 upload: stream tarball rather than read at once 2025-05-20 13:37:46 +02:00
Jörg Thalheim
792826f0cb mypy: ignore clan_lib.nixpkgs 2025-05-20 13:37:46 +02:00
Jörg Thalheim
68854f36ff mypy: ignore clan_lib.nixpkgs 2025-05-20 13:36:18 +02:00
Johannes Kirschbauer
463eaff47c UI: remove unused inventory.ts file 2025-05-20 13:32:13 +02:00
Johannes Kirschbauer
30e74c408c Classgen: export field type definitions 2025-05-20 13:31:47 +02:00
Mic92
af8dd22369 Merge pull request 'add documentation on how to use macOS' (#3712) from macos into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3712
2025-05-20 11:01:10 +00:00
Jörg Thalheim
4f4c44c7d4 add documentation on how to use macOS 2025-05-20 12:56:02 +02:00
Brian McGee
55d1a94947 fix(ui): Exectuting typo in toast message 2025-05-20 11:52:34 +01:00
lassulus
33f3f01e56 clan-cli: clan_cli.colors -> clan_lib.colors 2025-05-20 12:52:12 +02:00
lassulus
d15d135e23 clan_cli mypy: ignore nixpkgs at new location 2025-05-20 12:51:44 +02:00
lassulus
af69a0d5c3 Merge pull request 'clan-cli: clan_cli.dirs -> clan_lib.dirs' (#3706) from clan_lib_dirs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3706
2025-05-20 10:34:40 +00:00
lassulus
3bdf296205 clan-cli: clan_cli.dirs -> clan_lib.dirs 2025-05-20 12:17:52 +02:00
lassulus
f5e9f305d0 clan-cli: clan_cli.dirs -> clan_lib.dirs 2025-05-20 12:08:30 +02:00
Mic92
050804a917 Merge pull request 'Fix deploying to macOS as root' (#3700) from nix-darwin into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3700
2025-05-20 09:08:04 +00:00
Jörg Thalheim
56cc7977f3 use absolute path to darwin-rebuild to workaround missing login shells used on macOS 2025-05-20 10:56:44 +02:00
Jörg Thalheim
5195a049a1 add workaround for nix-copy on darwin 2025-05-20 10:56:44 +02:00
Jörg Thalheim
52ea2ea352 host.run: improve quoting of bash command 2025-05-20 10:56:44 +02:00
Mic92
7f3459d178 Merge pull request 'Stop warning about inventory.instances' (#3710) from stabilize-inventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3710
2025-05-20 08:41:40 +00:00
Jörg Thalheim
494ea192e7 drop deploy_as_root check
We haven't documented macOS support yet, so I don't expect many people
using it yet. Now that the pull request is merged probably most people
starting with darwin-nix will be on that commit anyway, so it's not
worth the check, given that the sudo version doesn't work very well.
2025-05-20 10:38:54 +02:00
Jörg Thalheim
6c42baca23 bump nix-darwin 2025-05-20 10:25:01 +02:00
Mic92
f18b219d0c Merge pull request 'fix logger no longer applying to clan_lib' (#3709) from logging into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3709
2025-05-20 08:21:20 +00:00
Jörg Thalheim
72073494a1 Stop warning about inventory.instances
we now marked inventory.modules as deprecated, so this new api can be no
longer under development
2025-05-20 10:12:34 +02:00
Jörg Thalheim
fb19b7c9de custom_logger/print_trace: no longer check for run_no_stdout
this function was removed.
2025-05-20 10:09:20 +02:00
Jörg Thalheim
88a3f0a6a7 logger: only get file path if actually requested
this is a rather expensive operation.
2025-05-20 10:09:20 +02:00
Jörg Thalheim
ccf8e99a98 fix logger no longer applying to clan_lib
with moving code to clan_lib we are missing logging for some output. To
fix this we remove the module scoping from the logger and just set one
global logger.
2025-05-20 10:09:20 +02:00
DavHau
a22180f980 GUI/vars: refactor vars step 2025-05-20 11:32:32 +07:00
clan-bot
131afefe3a Merge pull request 'Update Clan Core for Checks' (#3707) from update-clan-core-for-checks into main 2025-05-20 03:01:39 +00:00
clan-bot
d880634d22 Update pinned clan-core for checks 2025-05-20 02:52:07 +00:00
lassulus
dc4aae643a Merge pull request 'clan-cli: clan_cli.cmd -> clan_lib.cmd' (#3705) from clan_lib_cmd into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3705
2025-05-19 17:19:55 +00:00
lassulus
1df5dfe6d3 clan-cli: clan_cli.cmd -> clan_lib.cmd 2025-05-19 19:07:24 +02:00
lassulus
0f6e5499f6 Merge pull request 'fix(cli/machines/deploy): warn on local input' (#3687) from tennox/clan-core:warn-local-input into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3687
Reviewed-by: lassulus <clanlol@lassul.us>
2025-05-19 16:58:33 +00:00
lassulus
7df15c67d3 Merge pull request 'clan-cli: move clan_cli.nix to clan_lib.nix' (#3704) from clan_lib_nix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3704
2025-05-19 16:56:10 +00:00
lassulus
b10682c7f7 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
lassulus
43d9fdc77e Merge pull request 'clan_lib flake: fix handling garbage collected store paths as cached values' (#3699) from select-path-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3699
2025-05-19 16:01:31 +00:00
lassulus
9f27e21bd4 clan_lib flake: remove redundant store definition 2025-05-19 17:49:12 +02:00
lassulus
2129790bda clan_lib flake: test if cache gets invalidated with nix gc 2025-05-19 17:48:46 +02:00
lassulus
bd70f4cff2 clan_lib flake: get select output without nixpkgs 2025-05-19 16:11:56 +02:00
lassulus
fb5839f929 clan_lib flake: get store path from NIX_STORE_DIR 2025-05-19 16:11:56 +02:00
lassulus
76e4ecb6d5 clan_lib flake: check the whole tree even if we fetched all keys before
This is needed because nix garbage collection can remove store paths. So
the cache can become invalid because a path needs to be rebuild.
2025-05-19 16:11:56 +02:00
DavHau
dc2abb1352 UI: add vars step to installation flow 2025-05-19 19:11:19 +07:00
DavHau
93b23a38dd clan-app/devshell: add script to launch qemu VMs for testing 2025-05-19 18:37:09 +07:00
DavHau
bdddcd05cc Merge pull request 'clanModules/wifi: refactor to use NetworkManager' (#3701) from DavHau/clan-core:wifi into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3701
2025-05-19 11:33:22 +00:00
DavHau
1f33f7aad4 clanModules/wifi: refactor to use NetworkManager
Neither iwd, nor wpa_supplicant seem to be very reliable on some machines I tested.
Also NetworkManager has generally the best GUI support so it makes sense to build ontop of it
2025-05-19 18:14:37 +07:00
pinpox
5dbfca0364 Merge pull request 'docs: add glossary' (#3698) from docs-glossary into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3698
2025-05-19 09:47:39 +00:00
pinpox
6525b591e2 docs: add glossary 2025-05-19 11:41:00 +02:00
Mic92
79e615b5b1 Merge pull request 'machines/upload: start to use builtin sudo' (#3697) from builtin-sudo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3697
2025-05-19 09:30:40 +00:00
Jörg Thalheim
9405e40d00 machines/upload: start to use builtin sudo 2025-05-19 11:18:15 +02:00
clan-bot
cdd9b8a3e4 Merge pull request 'Update Clan Core for Checks' (#3696) from update-clan-core-for-checks into main 2025-05-19 03:01:50 +00:00
clan-bot
e4ffae84a7 Update pinned clan-core for checks 2025-05-19 02:52:08 +00:00
Mic92
df611dd3db Merge pull request 'move flake test into flake folder' (#3682) from flake-in-lib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3682
2025-05-18 20:13:14 +00:00
lassulus
96feb5bd26 clan_lib: move test_flake_caching into clan_lib flake folder 2025-05-18 21:35:56 +02:00
hsjobeki
989fdbca49 Merge pull request 'Docs: unify 'manual' with 'guides'' (#3693) from hsjobeki/clan-core:docs-structure into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3693
2025-05-18 18:52:40 +00:00
Johannes Kirschbauer
88f7b3410e Docs: unify 'manual' with 'guides' folder
This is one of the final steps towards strictly following
https://diataxis.fr/
2025-05-18 20:40:40 +02:00
Johannes Kirschbauer
ef29e62d9b Docs: update some references to contributing 2025-05-18 20:31:49 +02:00
hsjobeki
a9f746c1d3 Merge pull request 'Docs: move {contributing, disk, mesh, backups} into guides' (#3692) from hsjobeki/clan-core:docs-structure into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3692
2025-05-18 16:59:51 +00:00
Johannes Kirschbauer
b36d641e71 Docs: move {flake, facts-vars} migration guides into 'migrations' folder 2025-05-18 18:56:03 +02:00
Johannes Kirschbauer
04146eeac9 Docs: remove useless repo-layout file 2025-05-18 18:49:29 +02:00
Johannes Kirschbauer
3051763cbf Docs: remove dafts folder 2025-05-18 18:48:23 +02:00
Johannes Kirschbauer
df5010084f Docs: create migrations subfolder in guides 2025-05-18 18:46:36 +02:00
Johannes Kirschbauer
e9278ceaba Docs: place reference to new ClanModules on index page 2025-05-18 18:40:10 +02:00
Johannes Kirschbauer
0261a954de Docs: move 'getting-started' into guides section 2025-05-18 18:35:11 +02:00
Johannes Kirschbauer
ad5bbdbee0 Docs: move {contributing, disk, mesh, backups} into guides 2025-05-18 18:22:32 +02:00
clan-bot
7f62a7993a Merge pull request 'Update Clan Core for Checks' (#3688) from update-clan-core-for-checks into main 2025-05-18 03:01:46 +00:00
clan-bot
04e842a2a5 Update pinned clan-core for checks 2025-05-18 02:52:08 +00:00
Manu [tennox]
3986200c74 fix(cli/machines/deploy): warn on local input
see: https://git.clan.lol/clan/clan-core/issues/3112
2025-05-17 15:30:32 +01:00
clan-bot
b27d6bb29b Merge pull request 'Update Clan Core for Checks' (#3685) from update-clan-core-for-checks into main 2025-05-17 03:01:12 +00:00
clan-bot
ed72abcc5c Update pinned clan-core for checks 2025-05-17 02:51:35 +00:00
renovate[bot]
64a146400f Update treefmt-nix digest to 42dd928 2025-05-17 00:50:18 +00:00
renovate[bot]
2d665e876e Update data-mesher digest to 826a1ab 2025-05-16 18:50:12 +00:00
lassulus
fb746b874c clan_lib: move clan_lib.flake.flake to clan_lib.flake 2025-05-16 19:28:36 +02:00
hsjobeki
00eac81c2f Merge pull request 'Refactor(cli): name set_inv_machine back to set_machine' (#3681) from hsjobeki/clan-core:chores-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3681
2025-05-16 16:23:51 +00:00
Johannes Kirschbauer
0b404b9637 Fix: typing cast dataclass_type into type explizitly 2025-05-16 18:11:46 +02:00
Johannes Kirschbauer
6a6dd8ad2a Fix: missing recipient should print a message 2025-05-16 18:09:53 +02:00
Johannes Kirschbauer
2e2335a922 Fix(cli/machines/list): make listing machines safer 2025-05-16 18:05:49 +02:00
Johannes Kirschbauer
d5d7cba6a5 Fix(cli/state):_Make listing state folders more safe 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
a5d561b996 Fix(cli/dirs): properly import urllib.parse module 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
6b08527929 Fix(cli/vars): log.info; since machine is unbound in this context 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
211ca59441 Fix: typing in async_run 2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
29811cd0dc Refactor(cli): name set_inv_machine back to set_machine
We don't want to leak information about our internals
Such as 'inv' meaning 'inventory' this is not important from the outside
2025-05-16 18:05:07 +02:00
Johannes Kirschbauer
e4a6cbc7e3 Refactor: rename api set_inv_machine parameter to 'machines,update' 2025-05-16 17:57:40 +02:00
hsjobeki
1bcf5a82a6 Merge pull request 'refactor: move clan_cli.error to clan_lib.error' (#3677) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3677
2025-05-16 15:17:41 +00:00
Johannes Kirschbauer
1adcada568 Fix: dynamically import clan_cli in flake methods
This is a temporary workaround to solve cyclic imports all these modules should be moved to clan_lib
soon afterwards
2025-05-16 17:02:58 +02:00
Mic92
80606274ed Merge pull request 'installation: put use_tor option in right place' (#3680) from installation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3680
2025-05-16 14:43:17 +00:00
hsjobeki
fa270cf74c Merge pull request 'Docs: init migration guide for clanServices' (#3679) from service-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3679
2025-05-16 14:39:22 +00:00
Johannes Kirschbauer
9221231e89 docs: move authoring guides into guides subfolder 2025-05-16 16:33:39 +02:00
Jörg Thalheim
74f9ee4326 machines.eval_nix: remove unused refresh parameter 2025-05-16 16:31:25 +02:00
Jörg Thalheim
7d6ddc5e59 installation: put use_tor option in right place
we would always disable tor, even if enabled.
2025-05-16 16:18:25 +02:00
Johannes Kirschbauer
868db1e6f3 Docs: init migration guide for clanServices 2025-05-16 16:15:51 +02:00
Johannes Kirschbauer
f210b2f9a6 refactor: move clan_cli.error to clan_lib.error 2025-05-16 16:14:39 +02:00
Mic92
9a642e465f Merge pull request 'upload: don't try to re-create directory if it already exists' (#3678) from upload into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3678
2025-05-16 13:53:05 +00:00
Jörg Thalheim
0c1a48c9d4 upload: don't try to re-create directory if it already exists
This allows bind mounts i.e. needed for preserveration/impermanence
2025-05-16 15:39:09 +02:00
hsjobeki
56f3fd0a45 Merge pull request 'Docs for clan service options' (#3670) from service-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3670
2025-05-16 13:02:28 +00:00
Johannes Kirschbauer
21f87f169a Docs: improve clanService docs 2025-05-16 14:58:46 +02:00
lassulus
829cdcb826 Merge pull request 'clan_cli: move flake class to clan_lib' (#3676) from flake-in-api into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3676
2025-05-16 12:00:00 +00:00
lassulus
3dc41f7d5f clan_cli: move flake class to clan_lib 2025-05-16 13:38:47 +02:00
hsjobeki
f68b372268 Merge pull request 'Refactor: replace direct references to inventory' (#3674) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3674
2025-05-16 10:43:24 +00:00
lassulus
35bceac822 Merge pull request 'clan_cli flake: get selectLib as path: as well' (#3675) from select-as-path into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3675
2025-05-16 10:22:24 +00:00
lassulus
2892bbe93e clan_cli flake: get selectLib as path: as well
This is needed so older nix versions can get select in a pure way. Since
non path: paths can never be pure on older nix versions
2025-05-16 11:37:22 +02:00
Johannes Kirschbauer
c43d8fa958 Refactor: replace direct references to inventory
Deprecated. Inventory should be accessed via InventoryStore {read(),write(),...}
2025-05-16 11:30:41 +02:00
pinpox
8220c32142 Add clanServices to docs
Renders the documentation for clanServices. Options for the modules are
extracted and rendered the same way as for the existing clanModules.

Additionally tweaks the typography for the documentation of options
slightly
2025-05-16 11:29:50 +02:00
hsjobeki
13fa74b8cd Merge pull request 'clan-cli: Unify list_machines and use flake caching' (#3673) from Qubasa/clan-core:fix_ui_stuff into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3673
2025-05-16 09:08:59 +00:00
Qubasa
d765f1078b clan-cli: Unify list_machines and use flake caching 2025-05-16 10:47:49 +02:00
renovate[bot]
37180ff2af chore(deps): update nix-darwin digest to 8817b00 2025-05-16 03:40:10 +00:00
clan-bot
766c11f900 Merge pull request 'Update Clan Core for Checks' (#3671) from update-clan-core-for-checks into main 2025-05-16 03:00:46 +00:00
clan-bot
3841b8ea8c Update pinned clan-core for checks 2025-05-16 02:51:34 +00:00
renovate[bot]
bd5c33041d chore(deps): update data-mesher digest to 7afcd6f 2025-05-15 17:50:25 +00:00
renovate[bot]
d36b6f08fe chore(deps): update nixpkgs digest to b1bebd0 2025-05-15 17:30:26 +00:00
Mic92
dc424c6970 Merge pull request 'Merge clan-app and ui environment into one' (#3661) from feat/web-ui-process-compose into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3661
Reviewed-by: brianmcgee <brian@bmcgee.ie>
2025-05-15 13:19:31 +00:00
Jörg Thalheim
7f63920933 clan-app/devshell: remove duplicate python3
we already get python3 from the frontend.
2025-05-15 15:03:35 +02:00
Jörg Thalheim
a484f2a7fc fix references in reload-python-api script 2025-05-15 15:03:05 +02:00
Jörg Thalheim
ed3f8f85c8 remove generated files from git. 2025-05-15 14:56:04 +02:00
Jörg Thalheim
9e8dc584eb clan-app/README: more robust process-compose command
I had port conflicts with tcp, so let's use unix socket by default.
Also added --keep-project to make trouble-shouting easier in case
something is wrong.
2025-05-15 14:56:04 +02:00
Jörg Thalheim
146f183256 clan-app/ui: remove unused .envrc
this has been merged into clan-app's envrc
2025-05-15 14:56:04 +02:00
Jörg Thalheim
cc20e0bf35 clan-ui: remove intermediate app directory 2025-05-15 14:56:04 +02:00
Jörg Thalheim
876027ea02 clan-app: filter out unrelated files from build
this should help for faster ci builds.
2025-05-15 14:43:51 +02:00
Jörg Thalheim
34349ab4c1 process-compose: simplify environment
we already are in the right devshell for clan-app, so we no longer need
direnv exec. Instead of depending on implicit enviroment variables we
can run change the directory based on the git root as this is easier to
read and follow.
2025-05-15 14:43:51 +02:00
Jörg Thalheim
a2bc237d79 devshells.clan-app: require less environment variables
also sort shellHook by component
2025-05-15 14:43:51 +02:00
Jörg Thalheim
3b5f1f2c5c rename devshells.ui to clan-app 2025-05-15 14:15:59 +02:00
Jörg Thalheim
2561e3e4d1 rename ui to clan-app and move clan-app one layer up 2025-05-15 14:15:59 +02:00
renovate[bot]
180e84d9e9 chore(deps): update dependency @types/node to v20.17.47 2025-05-15 11:10:14 +00:00
Mic92
cc1f78058b Merge pull request 'feat: use process-compose to run ui dev environment' (#3646) from feat/web-ui-process-compose into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3646
2025-05-15 11:08:37 +00:00
Jörg Thalheim
6159456024 process-compose: integrate with direnv 2025-05-15 13:01:36 +02:00
Brian McGee
00ee0d807a feat: use process-compose to run ui dev environment 2025-05-15 12:00:27 +01:00
Brian McGee
78475e5a82 fix: move vendoring of nixpkgs and select into root devshell 2025-05-15 12:00:26 +01:00
Brian McGee
c26cc9503c feat: group ui related packages under a ui directory 2025-05-15 12:00:24 +01:00
Mic92
c50cf54e33 Merge pull request 'clan-app: set title and icon' (#3658) from clan-app-title into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3658
2025-05-15 10:42:06 +00:00
Jörg Thalheim
3eb8af34fc clan-app: prepare icon support on linux
For some reason the icon is not shown when using the gtk backend but at
least the API calls look correct.
2025-05-15 12:36:30 +02:00
Jörg Thalheim
172d571804 clan-app: set title 2025-05-15 12:36:24 +02:00
Jörg Thalheim
e337b9997c webview-lib: extend to support setting icons on Linux 2025-05-15 12:36:11 +02:00
Mic92
f436d91711 Merge pull request 'chore(deps): update data-mesher digest to ca961db' (#3655) from renovate/data-mesher-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3655
2025-05-15 10:18:13 +00:00
Mic92
9a2a72132d Merge pull request 'chore(deps): update nix-darwin digest to b6fff20' (#3653) from renovate/nix-darwin-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3653
2025-05-15 10:18:03 +00:00
hsjobeki
358ce9e179 Merge pull request 'Chore: remove spurious module.nix' (#3657) from hsjobeki/clan-core:chores-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3657
2025-05-15 10:15:29 +00:00
Johannes Kirschbauer
e4ba4621d0 Chore: remove spurious module.nix 2025-05-15 12:08:44 +02:00
renovate[bot]
25aa561cb5 chore(deps): update nix-darwin digest to b6fff20 2025-05-15 10:00:22 +00:00
renovate[bot]
9742f7516a chore(deps): update data-mesher digest to ca961db 2025-05-15 10:00:20 +00:00
renovate[bot]
8d7c938138 chore(deps): update nixpkgs digest to 2e1da60 2025-05-15 09:30:30 +00:00
renovate[bot]
d7bf049058 chore(deps): update treefmt-nix digest to e758f27 2025-05-15 09:10:13 +00:00
Mic92
f91e0a99d2 Merge pull request 'Add multiline-hidden-prompt' (#3632) from multiline-hidden-prompt into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3632
Reviewed-by: hsjobeki <hsjobeki@gmail.com>
Reviewed-by: lopter <louis@opter.org>
2025-05-15 08:10:34 +00:00
lassulus
4ea40fe8a3 clan-cli vars upload: create dir if provided 2025-05-15 06:42:24 +00:00
clan-bot
c82189d927 Merge pull request 'Update Clan Core for Checks' (#3652) from update-clan-core-for-checks into main 2025-05-15 03:01:17 +00:00
clan-bot
03ce651de6 Update pinned clan-core for checks 2025-05-15 02:51:34 +00:00
renovate[bot]
710258094b chore(deps): update disko digest to ec7c109 2025-05-15 02:40:09 +00:00
Mic92
ebb9da663a Merge pull request 'fix ssh master on macos' (#3649) from ssh-master into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3649
2025-05-14 22:19:51 +00:00
Jörg Thalheim
b383e672dd fix ssh master on macos 2025-05-14 20:30:36 +02:00
Jörg Thalheim
6053d9631f prompt: handle KeyboardInterrupt more gracefully 2025-05-14 19:53:36 +02:00
Jörg Thalheim
1ff5d64a78 do not instantiate vars_generators several times
We should really not have any property that has side effects i.e.
spawning processes.
2025-05-14 19:53:36 +02:00
Jörg Thalheim
d397c8ad39 add multiline-hidden prompt for both ui and cli 2025-05-14 19:53:36 +02:00
hsjobeki
974c3f9b09 Merge pull request 'feat(clanModules): add deprecation feature that generates a warning if the module is used' (#3648) from hsjobeki/clan-core:persistence-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3648
2025-05-14 15:13:51 +00:00
hsjobeki
90b0e811a4 Merge pull request 'clan-app: draw header above other elements' (#3647) from fix-header into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3647
2025-05-14 15:10:39 +00:00
Johannes Kirschbauer
ec6a86f8ef clanModules/wifi: deprecate in favor of inventory.instances 2025-05-14 17:08:17 +02:00
Johannes Kirschbauer
9edc3fb881 feat(clanModules): add deprecation feature that generates a warning if the module is used 2025-05-14 17:06:58 +02:00
hsjobeki
d5c77cda5b Merge pull request 'refactor(list/machines): use InventoryStore to interact with data"' (#3645) from hsjobeki/clan-core:persistence-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3645
2025-05-14 15:03:48 +00:00
lassulus
d019b3b57d clan-app: draw header above other elements 2025-05-14 17:01:46 +02:00
pinpox
2b699e6e81 Merge pull request 'Restore old admin module, with deprecation warning' (#3639) from admin-module-warning into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3639
2025-05-14 14:25:13 +00:00
pinpox
0e1831d0f4 add back old module for compatibility 2025-05-14 16:19:55 +02:00
Johannes Kirschbauer
e1f0590eac refactor(list/machines): use InventoryStore to interact with data" 2025-05-14 16:18:12 +02:00
Johannes Kirschbauer
90232977e2 chore: remove unused iwd python module 2025-05-14 16:17:03 +02:00
Johannes Kirschbauer
5b1b74e06f refactor(lib/persist): rename 'patch' to 'apply_patch' 2025-05-14 16:16:16 +02:00
Johannes Kirschbauer
800313c2a0 feat(lib/InventoryStore): add read method 2025-05-14 16:10:49 +02:00
renovate[bot]
0326476d4b chore(deps): update disko digest to 490c0d6 2025-05-14 13:10:09 +00:00
hsjobeki
c08af894b9 Merge pull request 'refactor(cli/inventory): move functions and tests into clan_lib' (#3641) from hsjobeki/clan-core:persistence-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3641
2025-05-14 11:47:37 +00:00
Johannes Kirschbauer
5e7b34a4c7 refactor(clan/lib): move tests for persist.util into clan_lib 2025-05-14 13:35:27 +02:00
hsjobeki
3dbad7a55b Merge pull request 'fix(wifi): register new modules in clan.modules NOT inventory.modules' (#3643) from hsjobeki/clan-core:fixes-module into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3643
2025-05-14 11:22:49 +00:00
Johannes Kirschbauer
2f073470df refactor(modules/admin): consistent clan.module registering 2025-05-14 13:16:36 +02:00
Johannes Kirschbauer
97a229a438 fix(wifi): register new modules in clan.modules NOT inventory.modules 2025-05-14 12:51:15 +02:00
Mic92
8162933711 Merge pull request 'ui: Remove garbage collection thread' (#3636) from remove-gc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3636
2025-05-14 10:19:44 +00:00
Johannes Kirschbauer
7e92308b70 refactor(lib/inventory): use util functions from clan_lib 2025-05-14 12:15:37 +02:00
Johannes Kirschbauer
f8540de48e refactor(cli/inventory): remove unncessary init_inventory function 2025-05-14 12:15:36 +02:00
pinpox
742fbd111f Add warning for deprecated admin module 2025-05-14 12:11:41 +02:00
Mic92
8b5cfb48c1 Merge pull request 'update cli vars on CLAN_CLI_PERF' (#3640) from clan-cli-perf into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3640
2025-05-14 10:11:25 +00:00
clan-bot
b5b26a6d13 Merge pull request 'Update Clan Core for Checks' (#3631) from update-clan-core-for-checks into main 2025-05-14 10:11:00 +00:00
Jörg Thalheim
2e4d6b0b2e update cli vars on CLAN_CLI_PERF 2025-05-14 12:07:38 +02:00
clan-bot
bf88aed318 Update pinned clan-core for checks 2025-05-14 10:01:10 +00:00
Jörg Thalheim
a97ed62e2a clan-app: decode function arguments ahead of launching a thread.
If something goew wrong here we rather want to crash the app and get bug
reports.
2025-05-14 11:52:55 +02:00
kenji
67406ef6cd Merge pull request 'modules/wifi: migrate to clan service' (#3638) from kenji/clan-core:ke-migrate-wifi into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3638
2025-05-14 09:52:15 +00:00
a-kenji
bbb4a9b5fb modules/wifi: migrate to clanServices 2025-05-14 09:52:15 +00:00
Jörg Thalheim
56ffd896dc clan-app: don't raise exception when we use ctr-c 2025-05-14 11:41:16 +02:00
Jörg Thalheim
693f404f4c api_wrapper: more descriptive parameter names
also only decode the op_key once
2025-05-14 11:39:25 +02:00
Jörg Thalheim
043e7fbb16 bind_jsonschema_api: reduce method nesting 2025-05-14 11:39:25 +02:00
hsjobeki
3520ca5ef3 Merge pull request 'docs(adrs): move decision folder into docs to make them publicly visible within docs' (#3633) from hsjobeki/clan-core:docs-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3633
2025-05-14 09:32:57 +00:00
hsjobeki
289c70d884 Merge pull request 'Clan(lib): add persistence layer as inventoryStore' (#3634) from hsjobeki/clan-core:persistence-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3634
2025-05-14 09:28:34 +00:00
Jörg Thalheim
603810da5e make listing/cancelling tasks less nosy in the logs 2025-05-14 10:49:09 +02:00
Jörg Thalheim
d0989cd0f5 remove thread garbage collection 2025-05-14 10:49:09 +02:00
Johannes Kirschbauer
973d7706bd refactor(lib/persist): move WriteInfo class into persistence lib 2025-05-14 10:19:07 +02:00
Johannes Kirschbauer
f722aafc18 chore(cli/inventory): add deprecation note for old python module 2025-05-14 10:18:27 +02:00
Johannes Kirschbauer
d825a3348b docs(adrs): move decision folder into docs to make them publicly visible within docs 2025-05-14 10:06:24 +02:00
Johannes Kirschbauer
a569a7bc7c chore(cli/inventory): remove unused 'default_inventory' 2025-05-14 09:28:06 +02:00
Johannes Kirschbauer
8b957a128f feat(clan_lib): add 'InventoryStore' for persistence 2025-05-14 09:18:55 +02:00
hsjobeki
259ac96bc3 Merge pull request 'Refactor(clan_lib): move nix bound classes out of the cli folder' (#3629) from hsjobeki/clan-core:clan-lib-4 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3629
2025-05-14 07:14:24 +00:00
Johannes Kirschbauer
c77a3b11a8 Refactor(clan_lib): move nix bound classes out of the cli folder 2025-05-13 18:39:36 +02:00
Mic92
0e50e47f16 Merge pull request 'fix(ui): high cpu because of spinning garbage collection' (#3630) from fix/ui-high-cpu into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3630
2025-05-13 16:38:14 +00:00
Brian McGee
6194c2a625 fix(ui): high cpu because of spinning garbage collection 2025-05-13 17:06:19 +01:00
Mic92
59e1512cfc Merge pull request 'cmd: wait on status after killing process' (#3628) from misc into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3628
2025-05-13 14:29:58 +00:00
Michael Hoang
8e96a8931e Merge pull request 'Revert "disable age-plugin-se for now on aarch64-linuxql"' (#3566) from push-vqkkqnuozxvx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3566
2025-05-13 14:24:11 +00:00
Jörg Thalheim
b14c27c7bb cmd: wait on status after killing process 2025-05-13 16:18:03 +02:00
Michael Hoang
8a3aacc00c Revert "disable age-plugin-se for now on aarch64-linuxql"
This reverts commit d0ff114f6b.
2025-05-14 00:12:49 +10:00
Jörg Thalheim
5ac4cc8586 tests_secrets_cli: improve assertion message for pgp key 2025-05-13 16:10:54 +02:00
Mic92
84e9835ed2 Merge pull request 'test_ssh_remote: skip whole module at once on macOS' (#3626) from darwin-ssh-remote into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3626
2025-05-13 14:07:42 +00:00
Jörg Thalheim
a62b828120 filter out test files from clan-cli source
this means we can fix test without having to re-run the installation
tests.
2025-05-13 15:55:00 +02:00
Mic92
5d10b7582a Merge pull request 'chore(deps): update nix-darwin digest to f88be00' (#3623) from renovate/nix-darwin-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3623
2025-05-13 13:32:20 +00:00
renovate[bot]
27f44a3662 chore(deps): update nix-darwin digest to f88be00 2025-05-13 13:20:10 +00:00
Mic92
f20f8b365a Merge pull request 'installer: set requireExplicitUpdate' (#3624) from installer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3624
2025-05-13 13:18:48 +00:00
Jörg Thalheim
78cea7f7c9 test_ssh_remote: skip whole module at once on macOS 2025-05-13 15:18:21 +02:00
Jörg Thalheim
d9075a5d79 installer: set requireExplicitUpdate
We usually don't want to update this system by default.
2025-05-13 15:02:05 +02:00
Luis Hebendanz
09c9c184ab Merge pull request 'clan-app: Fix machine update cancel task' (#3622) from Qubasa/clan-core:fix_cancellation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3622
2025-05-13 12:19:35 +00:00
Qubasa
daffc95c96 clan-app: Fix machine update cancel task 2025-05-13 14:06:02 +02:00
clan-bot
a12ba8e56f Merge pull request 'Update Clan Core for Checks' (#3621) from update-clan-core-for-checks into main 2025-05-13 12:05:55 +00:00
clan-bot
58fafac958 Update pinned clan-core for checks 2025-05-13 11:55:59 +00:00
Mic92
0f6e084640 Merge pull request 'update-clan-core-for-checks: retry merge after delay' (#3620) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3620
2025-05-13 11:54:43 +00:00
Jörg Thalheim
e941f2adde update-clan-core-for-checks: retry merge after delay 2025-05-13 13:51:03 +02:00
Mic92
a3b0c0472a Merge pull request 'update-clan-core-for-checks: use correct pr number' (#3618) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3618
2025-05-13 11:45:20 +00:00
Jörg Thalheim
e0c407a8a3 update-clan-core-for-checks: use correct pr number 2025-05-13 13:40:27 +02:00
Mic92
ce1256304c Merge pull request 'lib.filter: allow to name inputs' (#3616) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3616
2025-05-13 11:35:54 +00:00
Jörg Thalheim
84c0c7e678 lib.filter: allow to name inputs 2025-05-13 13:31:12 +02:00
Mic92
952859529d Merge pull request 'update-clan-core: fix json syntax' (#3615) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3615
2025-05-13 11:15:34 +00:00
Mic92
2e149c7a0e Merge pull request 'fix(data-mesher): default bootstrap nodes' (#3614) from fix/data-mesher-default-bootstrap-nodes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3614
2025-05-13 11:12:33 +00:00
Jörg Thalheim
6edd804731 update-clan-core: fix json syntax 2025-05-13 13:11:34 +02:00
kenji
cfa966d58c Merge pull request 'docs/index: Surface reference documentation' (#3612) from kenji/clan-core:ke-docs-index into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3612
2025-05-13 10:51:22 +00:00
a-kenji
9f805b9e46 docs/index: Surface reference documentation 2025-05-13 10:51:22 +00:00
Brian McGee
120dac6dbc fix(data-mesher): default bootstrap nodes 2025-05-13 11:48:01 +01:00
Mic92
16b6df18a5 Merge pull request 'update-clan-core: use pr id' (#3611) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3611
2025-05-13 10:47:08 +00:00
hsjobeki
eb50278d1e Merge pull request 'Feat(UI/modules): clean up module list styles' (#3591) from hsjobeki/clan-core:ui-fixes-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3591
2025-05-13 10:45:22 +00:00
Mic92
bfc7a74a66 Merge branch 'main' into ci-fixes 2025-05-13 10:42:50 +00:00
hsjobeki
b97177363a Merge pull request 'GUI: fix target IP not always shown' (#3610) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3610
2025-05-13 10:41:14 +00:00
Johannes Kirschbauer
217563740e Feat(UI/3d): init 3d prototype 2025-05-13 12:39:16 +02:00
Jörg Thalheim
b116df770c update-clan-core: use pr id 2025-05-13 12:37:02 +02:00
DavHau
e836492a80 merge-after-ci: don't format untracked files 2025-05-13 17:36:05 +07:00
DavHau
3db8b00898 pre-commit: don't format untracked files 2025-05-13 17:36:05 +07:00
DavHau
cbaa765154 GUI: fix target IP not always shown 2025-05-13 17:36:05 +07:00
Mic92
c506692d96 Merge pull request 'docs/devshell: make sure we are in the right directory before symlinking files' (#3609) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3609
2025-05-13 10:28:14 +00:00
Mic92
04108ff656 Merge pull request 'Update Clan Core for Checks' (#3608) from update-clan-core-for-checks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3608
2025-05-13 10:24:45 +00:00
Jörg Thalheim
028a401931 docs/devshell: make sure we are in the right directory before symlinking files 2025-05-13 12:24:20 +02:00
clan-bot
aead181fb7 Update pinned clan-core for checks 2025-05-13 10:05:02 +00:00
Mic92
f512f0a949 Merge pull request 'update-clan-core-for-checks: update pr description' (#3607) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3607
2025-05-13 09:22:39 +00:00
Mic92
77d266bdef Merge pull request 'Automated Update: Clan Core' (#3605) from update-clan-core-for-checks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3605
2025-05-13 09:21:25 +00:00
Jörg Thalheim
d73ff02749 update-clan-core-for-checks: update pr description 2025-05-13 11:18:42 +02:00
clan-bot
afae472e63 Update pinned clan-core for checks 2025-05-13 09:10:09 +00:00
Mic92
0989bbca36 Merge pull request 'update-clan-core-for-checks: use ci bot token for prs' (#3604) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3604
2025-05-13 09:09:29 +00:00
Jörg Thalheim
e6f53ac243 update-clan-core-for-checks: use ci bot token for prs 2025-05-13 11:05:06 +02:00
Mic92
c80cb601e0 Merge pull request 'update-clan-core-for-checks: fix head branch' (#3603) from ci-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3603
2025-05-13 09:00:10 +00:00
Jörg Thalheim
f1a53a1255 update-clan-core-for-checks: fix head branch 2025-05-13 10:52:52 +02:00
Mic92
d197f0f6e7 Merge pull request 'docs/guides: Fix typos in migration guide' (#3602) from kenji-ke-docs-vars-facts-migration-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3602
2025-05-13 08:37:37 +00:00
Mic92
f8a647d181 Merge pull request 'chore(deps): update nixpkgs digest to eaeed95' (#3596) from renovate/nixpkgs-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3596
2025-05-13 08:36:44 +00:00
a-kenji
21aa95b139 docs/guides: Fix typos in migration guide 2025-05-13 10:33:23 +02:00
renovate[bot]
968efb97d4 chore(deps): update nixpkgs digest to eaeed95 2025-05-13 08:30:10 +00:00
Mic92
ee1095a87e Merge pull request 'update-clan-core: use https' (#3600) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3600
2025-05-13 08:29:09 +00:00
Jörg Thalheim
573e79322e update-clan-core: use https 2025-05-13 10:18:56 +02:00
Mic92
a123e05557 Merge pull request 'update-clan-core-for-checks: pass GITEA_TOKEN correctly' (#3599) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3599
2025-05-13 08:17:44 +00:00
kenji
aac6066e20 Merge pull request 'docs/guides: facts vars migration guide' (#3598) from kenji/clan-core:ke-docs-vars-facts-migration into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3598
2025-05-13 08:10:32 +00:00
a-kenji
14969c5822 docs/guides: facts vars migration guide
Add a migration guide from facts to vars.
2025-05-13 08:10:32 +00:00
Mic92
8fbd465a2e Merge pull request 'Update nix-darwin digest to d642c98' (#3589) from renovate/nix-darwin-digest into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3589
2025-05-13 08:08:55 +00:00
Jörg Thalheim
005f11b00d update-clan-core-for-checks: pass GITEA_TOKEN correctly 2025-05-13 10:06:29 +02:00
renovate[bot]
36bc493a43 chore(deps): update nix-darwin digest to d642c98 2025-05-13 08:00:10 +00:00
Mic92
79271cb41b Merge pull request 'debug update-clan-core-for-checks action' (#3597) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3597
2025-05-13 07:55:37 +00:00
Jörg Thalheim
fb11710bdb debug update-clan-core-for-checks action 2025-05-13 09:48:46 +02:00
Mic92
ee8ee2a659 Merge pull request 'fix: Documentation for inventory.tags.nixos option' (#3595) from ginkogruen/clan-core:ginkogruen-patch-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3595
2025-05-13 07:44:26 +00:00
ginkogruen
70b152b548 fix: Documentation for inventory.tags.nixos option
Corrected documentation referencing machines with the machineClass = "darwin" set, when it should be: machineClass = "nixos"
2025-05-12 22:12:43 +00:00
Johannes Kirschbauer
ce774539b7 Feat(UI/modules): clean up module list styles 2025-05-12 20:48:25 +02:00
Luis Hebendanz
6670f2fd50 Merge pull request 'clan-app: Improved UX of handling toasts' (#3588) from Qubasa/clan-core:fix_clan_install into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3588
2025-05-12 17:15:32 +00:00
Qubasa
a834f210a0 clan-app: Improved UX of handling toasts 2025-05-12 18:54:53 +02:00
Mic92
7f0a430ec0 Merge pull request 'checks/update-clan-core-for-checks: provide missing curl' (#3587) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3587
2025-05-12 16:28:23 +00:00
hsjobeki
f5700ef742 Merge pull request 'UI: make tasks cancleable' (#3586) from hsjobeki/clan-core:qubasas into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3586
2025-05-12 16:24:45 +00:00
Jörg Thalheim
58b0e21040 checks/update-clan-core-for-checks: provide missing curl 2025-05-12 18:24:31 +02:00
hsjobeki
caaae17dca Merge pull request 'Feat(UI/modules): display more module informations' (#3585) from hsjobeki/clan-core:ui-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3585
2025-05-12 16:21:10 +00:00
Johannes Kirschbauer
98ae22bd1b Chore(UI): update some devDependencies in package.json 2025-05-12 18:18:11 +02:00
Johannes Kirschbauer
ef4806f71c Feat(UI/modules): display more module informations 2025-05-12 18:09:42 +02:00
Mic92
1de7b8cefd Merge pull request 'checks/update-clan-core-for-checks: force push' (#3584) from mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3584
2025-05-12 15:55:00 +00:00
Qubasa
5dff187a32 working fileSelect component 2025-05-12 17:54:10 +02:00
Qubasa
5b2a4cc696 clan-app: Working cancellable tasks 2025-05-12 17:54:10 +02:00
Qubasa
7eac2ce436 clan-app: Add cancellable tasks 2025-05-12 17:54:10 +02:00
Jörg Thalheim
36b72ec436 checks/update-clan-core-for-checks: force push 2025-05-12 17:50:52 +02:00
hsjobeki
a06bd43a1a Merge pull request 'Migrate admin module to clanServices' (#3530) from admin-migrate-service into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3530
2025-05-12 15:48:24 +00:00
Mic92
552ea582d6 Merge pull request 'clan_cli flake select: fix on older nix versions' (#3580) from select-path into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3580
2025-05-12 15:31:13 +00:00
Mic92
2eaebbd1db Merge pull request 'checks/update-clan-core-for-checks: fix typo in git env' (#3583) from Mic92/clan-core:mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3583
2025-05-12 15:02:37 +00:00
Jörg Thalheim
acfc604435 checks/update-clan-core-for-checks: fix typo in git env 2025-05-12 16:58:38 +02:00
Mic92
2bee4a8167 Merge pull request 'Checks/update-clan-core-for-check: add email/name' (#3582) from Mic92/clan-core:mumble-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3582
2025-05-12 14:55:12 +00:00
Jörg Thalheim
0ab296a385 checks/update-clan-core-for-check: add email/name 2025-05-12 16:44:54 +02:00
lassulus
c9812e7682 clan_cli flake select: fix on older nix versions 2025-05-12 16:26:06 +02:00
Johannes Kirschbauer
3c157c4a31 Docs: init empty migration guide with references 2025-05-12 16:13:08 +02:00
Johannes Kirschbauer
ca17b64237 Feat: print better error if module was migrated 2025-05-12 16:12:43 +02:00
Jörg Thalheim
5206366ddf don't run impure checks on main
We need to make sure that these tests already pass in pull requests.
There is often no point running this on main because it's already to
late at this point.
2025-05-12 16:05:52 +02:00
Mic92
17e5f63149 Merge pull request 'clan/vars: Improve help for list subcommand' (#3576) from kenji/clan-core:ke-fix-vars-help into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3576
2025-05-12 14:04:27 +00:00
Mic92
ccb1f08345 Merge pull request 'Fix: remove unused service endpoints from UI' (#3579) from hsjobeki/clan-core:ui-fixes-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3579
2025-05-12 14:04:01 +00:00
Johannes Kirschbauer
a87ab490a3 Fix: update test and docs 2025-05-12 15:54:50 +02:00
pinpox
5d26caa15a Remove admin UI interface 2025-05-12 15:54:50 +02:00
pinpox
d109090bcf Fix warning 2025-05-12 15:54:50 +02:00
pinpox
4ea4876644 Remove unnecessary file 2025-05-12 15:54:50 +02:00
pinpox
8433248c56 disable PAM for SSH check 2025-05-12 15:54:50 +02:00
pinpox
3bdfa7e405 migrate admin module 2025-05-12 15:54:49 +02:00
Johannes Kirschbauer
3bddb26b48 Fix: remove unused service endpoints from UI 2025-05-12 15:52:49 +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
a6f17f18a2 clan/vars: Improve help for list subcommand
Closes #3550
2025-05-12 14:57:50 +02: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
1242 changed files with 47411 additions and 24162 deletions

View File

@@ -1,9 +1,6 @@
name: checks
on:
pull_request:
push:
branches:
- main
jobs:
checks-impure:
runs-on: nix

75
.gitea/workflows/create-pr.sh Executable file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Shared script for creating pull requests in Gitea workflows
set -euo pipefail
# Required environment variables:
# - CI_BOT_TOKEN: Gitea bot token for authentication
# - PR_BRANCH: Branch name for the pull request
# - PR_TITLE: Title of the pull request
# - PR_BODY: Body/description of the pull request
if [[ -z "${CI_BOT_TOKEN:-}" ]]; then
echo "Error: CI_BOT_TOKEN is not set" >&2
exit 1
fi
if [[ -z "${PR_BRANCH:-}" ]]; then
echo "Error: PR_BRANCH is not set" >&2
exit 1
fi
if [[ -z "${PR_TITLE:-}" ]]; then
echo "Error: PR_TITLE is not set" >&2
exit 1
fi
if [[ -z "${PR_BODY:-}" ]]; then
echo "Error: PR_BODY is not set" >&2
exit 1
fi
# Push the branch
git push origin "+HEAD:${PR_BRANCH}"
# Create pull request
resp=$(nix run --inputs-from . nixpkgs#curl -- -X POST \
-H "Authorization: token $CI_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"head\": \"${PR_BRANCH}\",
\"base\": \"main\",
\"title\": \"${PR_TITLE}\",
\"body\": \"${PR_BODY}\"
}" \
"https://git.clan.lol/api/v1/repos/clan/clan-core/pulls")
pr_number=$(echo "$resp" | jq -r '.number')
if [[ "$pr_number" == "null" ]]; then
echo "Error creating pull request:" >&2
echo "$resp" | jq . >&2
exit 1
fi
echo "Created pull request #$pr_number"
# Merge when checks succeed
while true; do
resp=$(nix run --inputs-from . nixpkgs#curl -- -X POST \
-H "Authorization: token $CI_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"Do": "merge",
"merge_when_checks_succeed": true,
"delete_branch_after_merge": true
}' \
"https://git.clan.lol/api/v1/repos/clan/clan-core/pulls/$pr_number/merge")
msg=$(echo "$resp" | jq -r '.message')
if [[ "$msg" != "Please try again later" ]]; then
break
fi
echo "Retrying in 2 seconds..."
sleep 2
done
echo "Pull request #$pr_number merge initiated"

View File

@@ -0,0 +1,28 @@
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
env:
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
run: |
export GIT_AUTHOR_NAME=clan-bot GIT_AUTHOR_EMAIL=clan-bot@clan.lol GIT_COMMITTER_NAME=clan-bot GIT_COMMITTER_EMAIL=clan-bot@clan.lol
git commit -am "Update pinned clan-core for checks"
# Use shared PR creation script
export PR_BRANCH="update-clan-core-for-checks"
export PR_TITLE="Update Clan Core for Checks"
export PR_BODY="This PR updates the pinned clan-core flake input that is used for checks."
./.gitea/workflows/create-pr.sh

View File

@@ -0,0 +1,40 @@
name: "Update private flake inputs"
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 3 * * *" # Run daily at 3 AM
jobs:
update-private-flake:
runs-on: nix
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Update private flake inputs
run: |
# Update the private flake lock file
cd devFlake/private
nix flake update
cd ../..
# Update the narHash
bash ./devFlake/update-private-narhash
- name: Create pull request
env:
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
run: |
export GIT_AUTHOR_NAME=clan-bot GIT_AUTHOR_EMAIL=clan-bot@clan.lol GIT_COMMITTER_NAME=clan-bot GIT_COMMITTER_EMAIL=clan-bot@clan.lol
# Check if there are any changes
if ! git diff --quiet; then
git add devFlake/private/flake.lock devFlake/private.narHash
git commit -m "Update dev flake"
# Use shared PR creation script
export PR_BRANCH="update-dev-flake"
export PR_TITLE="Update dev flake"
export PR_BODY="This PR updates the dev flake inputs and corresponding narHash."
else
echo "No changes detected in dev flake inputs"
fi

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 }}

38
.gitignore vendored
View File

@@ -1,23 +1,23 @@
.direnv
**/.nixos-test-history
***/.hypothesis
.nixos-test-history
.hypothesis
out.log
.coverage.*
**/qubeclan
pkgs/repro-hook
**/testdir
testdir
democlan
example_clan
**/result
/pkgs/clan-cli/clan_cli/nixpkgs
result*
/pkgs/clan-cli/clan_lib/nixpkgs
/pkgs/clan-cli/clan_cli/webui/assets
nixos.qcow2
**/*.glade~
*.glade~
/docs/out
**/.local.env
/pkgs/clan-cli/clan_lib/select
.local.env
# dream2nix
.dream2nix
# macOS stuff
.DS_Store
# python
__pycache__
@@ -28,14 +28,18 @@ __pycache__
.ruff_cache
htmlcov
# flatpak
.flatpak-builder
build
build-dir
repo
.env
# node
node_modules
dist
.webui
# TODO: remove after bug in select is fixed
select
# Generated files
pkgs/clan-app/ui/api/API.json
pkgs/clan-app/ui/api/API.ts
pkgs/clan-app/ui/api/Inventory.ts
pkgs/clan-app/ui/api/modules_schemas.json
pkgs/clan-app/ui/api/schema.json
pkgs/clan-app/ui/.fonts

2
CODEOWNERS Normal file
View File

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

View File

@@ -1,4 +1,4 @@
# Contributing to Clan
<!-- Local file: docs/CONTRIBUTING.md -->
Go to the Contributing guide at https://docs.clan.lol/manual/contribute/
Go to the Contributing guide at https://docs.clan.lol/guides/contributing/CONTRIBUTING

View File

@@ -24,7 +24,7 @@ If you're new to Clan and eager to dive in, start with our quickstart guide and
In the Clan ecosystem, security is paramount. Learn how to handle secrets effectively:
- **Secrets Management**: Securely manage secrets by consulting [secrets](https://docs.clan.lol/getting-started/secrets/)<!-- [secrets.md](docs/site/getting-started/secrets.md) -->.
- **Secrets Management**: Securely manage secrets by consulting [secrets](https://docs.clan.lol/guides/getting-started/secrets/)<!-- [secrets.md](docs/site/guides/getting-started/secrets.md) -->.
### Contributing to Clan

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

@@ -19,11 +19,11 @@
...
}:
let
dependencies = [
self
pkgs.stdenv.drvPath
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-backup.config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
dependencies =
[
pkgs.stdenv.drvPath
]
++ builtins.map (i: i.outPath) (builtins.attrValues (builtins.removeAttrs self.inputs [ "self" ]));
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
@@ -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";
nixos-test-backups = self.clanLib.test.containerTest {
name = "nixos-test-backups";
nodes.machine = {
imports =
[
@@ -184,13 +162,8 @@
]
++
# import the inventory generated nixosModules
self.clanInternals.inventoryClass.machines.test-backup.machineImports;
self.clan.clanInternals.inventoryClass.machines.test-backup.machineImports;
clan.core.settings.directory = ./.;
environment.systemPackages = [
(pkgs.writeShellScriptBin "foo" ''
echo ${clanCore}
'')
];
};
testScript = ''

View File

@@ -0,0 +1,51 @@
(
{ ... }:
{
name = "borgbackup";
nodes.machine =
{ self, pkgs, ... }:
{
imports = [
self.clanModules.borgbackup
self.nixosModules.clanCore
{
services.openssh.enable = true;
services.borgbackup.repos.testrepo = {
authorizedKeys = [ (builtins.readFile ../assets/ssh/pubkey) ];
};
}
{
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 = "${../assets/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
user = "root";
};
};
};
# clan.core.facts.secretStore = "vm";
clan.core.vars.settings.secretStore = "vm";
clan.borgbackup.destinations.test.repo = "borg@localhost:.";
}
];
};
testScript = ''
start_all()
machine.systemctl("start --wait borgbackup-job-test.service")
assert "machine-test" in machine.succeed("BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes /run/current-system/sw/bin/borg-job-test list")
'';
}
)

View File

@@ -1,52 +1,102 @@
(import ../lib/test-base.nix) (
{
pkgs,
nixosLib,
clan-core,
...
}:
nixosLib.runTest (
{ ... }:
{
name = "borgbackup";
imports = [
clan-core.modules.nixosTest.clanTest
];
nodes.machine =
{ self, pkgs, ... }:
{
imports = [
self.clanModules.borgbackup
self.nixosModules.clanCore
{
services.openssh.enable = true;
services.borgbackup.repos.testrepo = {
authorizedKeys = [ (builtins.readFile ../lib/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}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
user = "root";
};
};
};
# clan.core.facts.secretStore = "vm";
clan.core.vars.settings.secretStore = "vm";
hostPkgs = pkgs;
clan.borgbackup.destinations.test.repo = "borg@localhost:.";
}
];
name = "service-borgbackup";
clan = {
directory = ./.;
test.useContainers = true;
modules."@clan/borgbackup" = ../../clanServices/borgbackup/default.nix;
inventory = {
machines.clientone = { };
machines.serverone = { };
instances = {
borgone = {
module.name = "@clan/borgbackup";
module.input = "self";
roles.client.machines."clientone" = { };
roles.server.machines."serverone".settings.directory = "/tmp/borg-test";
};
};
};
};
nodes = {
serverone = {
services.openssh.enable = true;
# Needed so PAM doesn't see the user as locked
users.users.borg.password = "borg";
};
clientone =
{ config, pkgs, ... }:
{
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../assets/ssh/pubkey ];
clan.core.networking.targetHost = config.networking.hostName;
environment.systemPackages = [ clan-core.packages.${pkgs.system}.clan-cli ];
clan.core.state.test-backups.folders = [ "/var/test-backups" ];
};
};
testScript = ''
import json
start_all()
machine.systemctl("start --wait borgbackup-job-test.service")
assert "machine-test" in machine.succeed("BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes /run/current-system/sw/bin/borg-job-test list")
machines = [clientone, serverone]
for m in machines:
m.systemctl("start network-online.target")
for m in machines:
m.wait_for_unit("network-online.target")
# dummy data
clientone.succeed("mkdir -p /var/test-backups /var/test-service")
clientone.succeed("echo testing > /var/test-backups/somefile")
clientone.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../assets/ssh/privkey} /root/.ssh/id_ed25519")
clientone.succeed("${pkgs.coreutils}/bin/touch /root/.ssh/known_hosts")
clientone.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new localhost hostname")
clientone.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new $(hostname) hostname")
# create
clientone.succeed("borgbackup-create >&2")
clientone.wait_until_succeeds("! systemctl is-active borgbackup-job-serverone >&2")
# list
backup_id = json.loads(clientone.succeed("borg-job-serverone list --json"))["archives"][0]["archive"]
out = clientone.succeed("borgbackup-list").strip()
print(out)
assert backup_id in out, f"backup {backup_id} not found in {out}"
# borgbackup restore
clientone.succeed("rm -f /var/test-backups/somefile")
clientone.succeed(f"NAME='serverone::borg@serverone:.::{backup_id}' borgbackup-restore >&2")
assert clientone.succeed("cat /var/test-backups/somefile").strip() == "testing", "restore failed"
'';
}
)

View File

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

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:wCKoKuJo4uXycfqEUYAXDlRRMGJaWgOFiaQa4Wigs0jx1eCI80lP3cEZ1QKyrU/9m9POoZz0JlaKHcuhziTKUqaevHvGfVq2y00=,iv:pH5a90bJbK9Ro6zndNJ18qd4/rU+Tdm+y+jJZtY7UGg=,tag:9lHZJ9C/zIfy8nFrYt9JBQ==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwUDhpd1ZqbWFqR0I3dVFI\nOHlyZnFUYXJnWElrRWhoUHVNMzdKd0VrcGdRCkphQVhuYzlJV0p1MG9MSW5ncWJ3\nREp1OEJxMzQzS2MxTk9aMkJ1a3B0Q0kKLS0tIENweVJ2Tk1yeXlFc2F5cTNIV3F3\nTkRFOVZ1amRIYmg1K3hGWUFSTTl4Wk0KHJRJ7756Msod7Bsmn9SgtwRo53B8Ilp3\nhsAPv+TtdmOD8He9MvGV+BElKEXCsLUwhp/Py6n6CJCczu0VIr8owg==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-20T13:33:56Z",
"mac": "ENC[AES256_GCM,data:FyfxXhnI6o4SVGJY2e1eMDnfkbMWiCkP4JL/G4PQvzz+c7OIuz8xaa03P3VW7b7o85NP2Tln4FMNTZ0FYtQwd0kKypLUnIxAHsixAHFCv4X8ul1gtZynzgbFbmc0GkfVWW8Lf+U+vvDwT+UrEVfcmksCjdvAOwP26PvlEhYEkSw=,iv:H+VrWYL+kLOLezCZrI8ZgeCsaUdpb7LxDMiLotezVPs=,tag:B/cbPdiEFumGKQHby5inCA==,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/clientone

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:52vY68gqbwiZRMUBKc9SeXR06fuKAhuAPciLpxXgEOxI,iv:Y34AVoHaZzRiFFTDbekXP1X3W8zSXJmzVCYODYkdxnY=,tag:8WQaGEHQKT/n+auHUZCE0w==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBOdUFUZUZ2M00zTGlhNjF4\nL0VlMVY4Z2xMbWRWR29zZlFwdm1XRk12NGtBCnkrb3A4M3BkalMyeWdDaUdQdStt\nUWY3SXJROXdpRzN0NlBJNEpjTEZ0aFkKLS0tIGZkMGhsTXB2RnRqVHVrUFQwL2lw\nZnBreWhWa3Jrcm4yOXBiaUlPWFM1aDAKRE+Zzrja7KeANEJUbmFYuVoO3qGyi4iH\n0cfH0W8irRe9vsKMXz7YJxtByYLwRulrT8tXtElHvIEVJG0mwwaf0Q==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1tyyx2ratu8s9ugyre36xyksnquth9gxeh7wjdhvsk89rtf8yu5wq0pk04c",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsNEljUFdnQ0tTQ1IxZ2Zo\nYkc4V2dCaUk0YXh5SzlSazhsRTVKVzFvVXhFCkRyMlMxR3EyWEZIRzFQV3d2dVpz\na3NPbk9XdWR1NmtMQlZsNlBuU0NkQWMKLS0tIDlDYzMzOExVL1g5SVRHYlpUQlBV\na2lpdTUwaEd4OXhWUWxuV04xRVVKNHcK9coohAD1IoarLOXSGg3MIRXQ3BsTIA4y\nKrcS/PxITKJs7ihg93RZin70R79Qsij1RHZLKGfgGJ67i8ZCxc4N0g==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-20T13:33:59Z",
"mac": "ENC[AES256_GCM,data:eABMaIe07dwAMMlgrIUUpfpj73q1H5Keafql91MBQ5NN9Znr5lI/ennQsQsuLO8ZTCC34US/MJndliW34SqVM9y53p0jjPzqBxSKYq74iNcBz7+TxbjlY1aapgTRPr6Ta8I/5loohnxlHqjvLL70ZzfbChDN0/4jZsDVXYNfbIk=,iv:41Mz2u40JN0iE5zPUK6siaxo0rTtlk7fGWq7TF5NyUI=,tag:1A+h6XPH7DeQ6kxGDV3PgQ==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:tAjfBW75XDS8lfJCf/+9rPYH3aMjRX1nmdN5dPMxnrlhuEPM3Smv9AM93Tz36k7BKk31bUWcV/99ax+KaIK1Rzgym/CwKGGxIUziuVOEOwrCOBeOw7amZ9YGsgiLUTLIhoeO6SjfdZ4q2JxGPw7KqNfUM9kiZT01vx5JTLa24JdvBKpizbtHRlL1lappTRVt0dG2WhT9/YhQUGu9ZFqPs8+bPOBclc78qjCm2DAPgsprK+JCBuq+r+qHgAx4Ee1QHI7FC39e5NeGBTBeZfZ5d95+0klKuTx9FCPs6QRBkQ0tN29OpwzkdSuRAXGGHpzPkZ+FupbETtSQWCmnjma6jPzEl8oDUTWooKK0mUEz8icvTQvRfyM3Qt3mQpkX3e0rTEbZzoLdWCwTufP/tRQNDCWvI/NV7OjIHpNPjymqE5uPmiBpA6y6hhCH7zL1eDo11ICSIX3hkyFJH2svvFQn6oLrPAoByvNutfetKhd8z7NFpVeIOWwtuPzO7wU5M7zESHww0JF78vjFwimQYYhQ,iv:fVjeVez4dTGSrANi5ZeP9PJhsSySqeqqJzBDbd0gFW4=,tag:Aa89+bWLljxV1tlSHtpddw==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVaW94M3VwcFJ2elcrRGlv\nUGdzVk9vU2ZweFpIVVlIRUEyRVlSMlEyeHpVCnJuV0xIS3hMLy9IbG92S0pvL2RP\nL0J0WkVuWVhQdldHekdYNTVXdFkrUlEKLS0tIFQzdGErZVBwQUFNMXErbDBQVURZ\naHlsY2hDa1Zud1E2dFh0ZHl4VEJ2S0kKVABqwRcCUTcsBInfo9CpFtoM3kl4KMyU\nGXDjHOSjlX5df7OKZAvYukgX7Q2penvq+Fq4fa4A1Cmkqga7cHdJ+A==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1tyyx2ratu8s9ugyre36xyksnquth9gxeh7wjdhvsk89rtf8yu5wq0pk04c",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnbHRSVEg3Vi9qTnAwWGF6\nbEdIR2gvZ2laZnJMbVF3NjcvN25OdXF3WXowCnVUODdEa1NWU3JISXlrNldOMjVi\ndUlMTVdBaWxvZHlwSTdJY3NCcll4SjAKLS0tIEp6ZVlDTklqVXdNYzJ2dElCR21o\nUWphMDdyVVppVnFHOVlHZTNtajZzOXMKRB61lUrAkUXSYl3ffOOK8k4QgLA4bFln\naQ7GOol8f8W5H68zXBMZrhjP6k4kZDfknc9jgyoWM7jaZNSWC5J19Q==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-05-20T13:33:59Z",
"mac": "ENC[AES256_GCM,data:NjVpDweqxTSQGt9VKR/CMfvbvHQJHCi8P7XbOuKLZKQ4GVoeZ5r4PsC6nxKHHikN6YL1oJCmaSxr0mJRk/sFZg/+wdW8L7F5aQeFRiWo9jCjH0MDMnfiu5a0xjRt21uPl/7LUJ9jNon5nyxPTlZMeYSvTP2Q9spnNuN8vqipP68=,iv:DPvbN9IvWiUfxiJk6mey/us8N1GGVJcSJrT8Bty4kB4=,tag:+emK8uSkfIGUXoYpaWeu3A==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

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

View File

@@ -0,0 +1,6 @@
{ fetchgit }:
fetchgit {
url = "https://git.clan.lol/clan/clan-core.git";
rev = "eea93ea22c9818da67e148ba586277bab9e73cea";
sha256 = "sha256-PV0Z+97QuxQbkYSVuNIJwUNXMbHZG/vhsA9M4cDTCOE=";
}

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,89 @@
{
pkgs,
nixosLib,
clan-core,
lib,
...
}:
let
machines = [
"admin"
"peer"
"signer"
];
in
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosTest.clanTest
];
hostPkgs = pkgs;
name = "service-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

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

View File

@@ -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

@@ -1,26 +1,69 @@
{ self, lib, ... }:
{
self,
lib,
inputs,
...
}:
let
inherit (lib)
attrNames
attrValues
elem
filter
filterAttrs
flip
genAttrs
hasPrefix
pathExists
;
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
in
{
imports = filter pathExists [
./backups/flake-module.nix
../nixosModules/clanCore/machine-id/tests/flake-module.nix
../nixosModules/clanCore/state-version/tests/flake-module.nix
./devshell/flake-module.nix
./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
];
flake.check = genAttrs [ "x86_64-linux" "aarch64-darwin" ] (
system:
let
checks = flip filterAttrs self.checks.${system} (
name: _check:
!(hasPrefix "nixos-test-" name)
&& !(hasPrefix "nixos-" name)
&& !(hasPrefix "darwin-test-" name)
&& !(hasPrefix "service-" name)
&& !(hasPrefix "vars-check-" name)
&& !(hasPrefix "devShell-" name)
&& !(elem name [
"clan-core-for-checks"
"clan-deps"
])
);
in
inputs.nixpkgs.legacyPackages.${system}.runCommand "fast-flake-checks-${system}"
{ passthru.checks = checks; }
''
echo "Executed the following checks for ${system}..."
echo " - ${lib.concatStringsSep "\n" (map (n: " - " + n) (attrNames checks))}"
echo ${toString (attrValues checks)} >/dev/null
echo "All checks succeeded"
touch $out
''
);
perSystem =
{
pkgs,
lib,
self',
system,
...
}:
{
@@ -28,36 +71,90 @@ in
let
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
inherit pkgs lib nixosLib;
# this gives us a reference to our flake but also all flake inputs
inherit self;
inherit (self) clanLib;
clan-core = self;
};
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;
# Base Tests
nixos-test-secrets = self.clanLib.test.baseTest ./secrets nixosTestArgs;
nixos-test-borgbackup-legacy = self.clanLib.test.baseTest ./borgbackup-legacy nixosTestArgs;
nixos-test-wayland-proxy-virtwl = self.clanLib.test.baseTest ./wayland-proxy-virtwl nixosTestArgs;
# Container Tests
nixos-test-container = self.clanLib.test.containerTest ./container nixosTestArgs;
nixos-test-zt-tcp-relay = self.clanLib.test.containerTest ./zt-tcp-relay nixosTestArgs;
nixos-test-matrix-synapse = self.clanLib.test.containerTest ./matrix-synapse nixosTestArgs;
nixos-test-postgresql = self.clanLib.test.containerTest ./postgresql nixosTestArgs;
nixos-test-user-firewall-iptables = self.clanLib.test.containerTest ./user-firewall/iptables.nix nixosTestArgs;
nixos-test-user-firewall-nftables = self.clanLib.test.containerTest ./user-firewall/nftables.nix nixosTestArgs;
service-dummy-test = import ./service-dummy-test nixosTestArgs;
service-dummy-test-from-flake = import ./service-dummy-test-from-flake nixosTestArgs;
service-data-mesher = import ./data-mesher 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' (
name: config: lib.nameValuePair "darwin-${name}" config.config.system.build.toplevel
) (self.darwinConfigurations or { })
// 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.evalService {
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
'';
};
packages = lib.optionalAttrs (pkgs.stdenv.isLinux) {
run-vm-test-offline = pkgs.callPackage ../pkgs/run-vm-test-offline { };
};
legacyPackages = {
nixosTests =
let
@@ -70,8 +167,10 @@ in
in
lib.optionalAttrs (pkgs.stdenv.isLinux) {
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
nixos-test-secrets = import ./secrets nixosTestArgs;
nixos-test-container = import ./container nixosTestArgs;
# Clan app tests
nixos-test-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,20 +43,19 @@
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
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.toplevel
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
checks = pkgs.lib.mkIf pkgs.stdenv.isLinux {
test-flash = (import ../lib/test-base.nix) {
nixos-test-flash = self.clanLib.test.baseTest {
name = "flash";
nodes.target = {
virtualisation.emptyDiskImages = [ 4096 ];
@@ -79,7 +77,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
@@ -27,10 +28,24 @@
ROOT=$(git rev-parse --show-toplevel)
cd "$ROOT/pkgs/clan-cli"
# Set up custom git configuration for tests
export GIT_CONFIG_GLOBAL=$(mktemp)
git config --file "$GIT_CONFIG_GLOBAL" user.name "Test User"
git config --file "$GIT_CONFIG_GLOBAL" user.email "test@example.com"
export GIT_CONFIG_SYSTEM=/dev/null
# 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 $@"
# Clean up temporary git config
rm -f "$GIT_CONFIG_GLOBAL"
'';
};
}

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

@@ -1,29 +1,76 @@
{
self,
lib,
...
}:
{
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";
# Enable SSH and add authorized key for testing
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
users.users.nonrootuser = {
isNormalUser = true;
openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
extraGroups = [ "wheel" ];
home = "/home/nonrootuser";
createHome = true;
};
users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
# Allow users to manage their own SSH keys
services.openssh.authorizedKeysFiles = [
"/root/.ssh/authorized_keys"
"/home/%u/.ssh/authorized_keys"
"/etc/ssh/authorized_keys.d/%u"
];
security.sudo.wheelNeedsPassword = false;
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
@@ -34,7 +81,7 @@
clan.core.vars.generators.test = {
files.test.neededFor = "partitioning";
script = ''
echo "notok" > $out/test
echo "notok" > "$out"/test
'';
};
disko.devices = {
@@ -80,140 +127,219 @@
};
};
};
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'.
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-installation = (import ../lib/test-base.nix) {
name = "test-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;
# 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 =
let
# Custom Python package for port management utilities
closureInfo = pkgs.closureInfo {
rootPaths = [
self.checks.x86_64-linux.clan-core-for-checks
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.initialRamdisk
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.diskoScript
pkgs.stdenv.drvPath
pkgs.bash.drvPath
pkgs.buildPackages.xorg.lndir
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
};
in
pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
nixos-test-installation = self.clanLib.test.baseTest {
name = "installation";
nodes.target = (import ./test-helpers.nix { inherit lib pkgs self; }).target;
extraPythonPackages = _p: [
self.legacyPackages.${pkgs.system}.nixosTestLib
];
testScript = ''
client.start()
installer.start()
testScript = ''
import tempfile
import os
import subprocess
from nixos_test_lib.ssh import setup_ssh_connection # type: ignore[import-untyped]
from nixos_test_lib.nix_setup import prepare_test_flake # type: ignore[import-untyped]
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")
def create_test_machine(oldmachine, qemu_test_bin: str, **kwargs):
"""Create a new test machine from an installed disk image"""
start_command = [
f"{qemu_test_bin}/bin/qemu-kvm",
"-cpu",
"max",
"-m",
"3048",
"-virtfs",
"local,path=/nix/store,security_model=none,mount_tag=nix-store",
"-drive",
f"file={oldmachine.state_dir}/target.qcow2,id=drive1,if=none,index=1,werror=report",
"-device",
"virtio-blk-pci,drive=drive1",
"-netdev",
"user,id=net0",
"-device",
"virtio-net-pci,netdev=net0",
]
machine = create_machine(start_command=" ".join(start_command), **kwargs)
driver.machines.append(machine)
return machine
# 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")
target.start()
# 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")
# Set up test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Prepare test flake and Nix store
flake_dir = prepare_test_flake(
temp_dir,
"${self.checks.x86_64-linux.clan-core-for-checks}",
"${closureInfo}"
)
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
# Set up SSH connection
ssh_conn = setup_ssh_connection(
target,
temp_dir,
"${../assets/ssh/privkey}"
)
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; };
};
# Run clan install from host using port forwarding
clan_cmd = [
"${self.packages.${pkgs.system}.clan-cli-full}/bin/clan",
"machines",
"install",
"--phases", "disko,install",
"--debug",
"--flake", flake_dir,
"--yes", "test-install-machine-without-system",
"--target-host", f"nonrootuser@localhost:{ssh_conn.host_port}",
"-i", ssh_conn.ssh_key,
"--option", "store", os.environ['CLAN_TEST_STORE'],
"--update-hardware-config", "nixos-facter",
]
subprocess.run(clan_cmd, check=True)
# Shutdown the installer machine gracefully
try:
target.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
# Create a new machine instance that boots from the installed system
installed_machine = create_test_machine(target, "${pkgs.qemu_test}", name="after_install")
installed_machine.start()
installed_machine.wait_for_unit("multi-user.target")
installed_machine.succeed("test -f /etc/install-successful")
'';
} { inherit pkgs self; };
nixos-test-update-hardware-configuration = self.clanLib.test.baseTest {
name = "update-hardware-configuration";
nodes.target = (import ./test-helpers.nix { inherit lib pkgs self; }).target;
extraPythonPackages = _p: [
self.legacyPackages.${pkgs.system}.nixosTestLib
];
testScript = ''
import tempfile
import os
import subprocess
from nixos_test_lib.ssh import setup_ssh_connection # type: ignore[import-untyped]
from nixos_test_lib.nix_setup import prepare_test_flake # type: ignore[import-untyped]
target.start()
# Set up test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Prepare test flake and Nix store
flake_dir = prepare_test_flake(
temp_dir,
"${self.checks.x86_64-linux.clan-core-for-checks}",
"${closureInfo}"
)
# Set up SSH connection
ssh_conn = setup_ssh_connection(
target,
temp_dir,
"${../assets/ssh/privkey}"
)
# Verify files don't exist initially
hw_config_file = os.path.join(flake_dir, "machines/test-install-machine/hardware-configuration.nix")
facter_file = os.path.join(flake_dir, "machines/test-install-machine/facter.json")
assert not os.path.exists(hw_config_file), "hardware-configuration.nix should not exist initially"
assert not os.path.exists(facter_file), "facter.json should not exist initially"
# Set CLAN_FLAKE for the commands
os.environ["CLAN_FLAKE"] = flake_dir
# Test facter backend
clan_cmd = [
"${self.packages.${pkgs.system}.clan-cli-full}/bin/clan",
"machines",
"update-hardware-config",
"--debug",
"--flake", ".",
"--host-key-check", "none",
"test-install-machine-without-system",
"-i", ssh_conn.ssh_key,
"--option", "store", os.environ['CLAN_TEST_STORE'],
f"nonrootuser@localhost:{ssh_conn.host_port}"
]
result = subprocess.run(clan_cmd, capture_output=True, cwd=flake_dir)
if result.returncode != 0:
print(f"Clan update-hardware-config failed: {result.stderr.decode()}")
raise Exception(f"Clan update-hardware-config failed with return code {result.returncode}")
facter_without_system_file = os.path.join(flake_dir, "machines/test-install-machine-without-system/facter.json")
assert os.path.exists(facter_without_system_file), "facter.json should exist after update"
os.remove(facter_without_system_file)
# Test nixos-generate-config backend
clan_cmd = [
"${self.packages.${pkgs.system}.clan-cli-full}/bin/clan",
"machines",
"update-hardware-config",
"--debug",
"--backend", "nixos-generate-config",
"--host-key-check", "none",
"--flake", ".",
"test-install-machine-without-system",
"-i", ssh_conn.ssh_key,
"--option", "store", os.environ['CLAN_TEST_STORE'],
f"nonrootuser@localhost:{ssh_conn.host_port}"
]
result = subprocess.run(clan_cmd, capture_output=True, cwd=flake_dir)
if result.returncode != 0:
print(f"Clan update-hardware-config (nixos-generate-config) failed: {result.stderr.decode()}")
raise Exception(f"Clan update-hardware-config failed with return code {result.returncode}")
hw_config_without_system_file = os.path.join(flake_dir, "machines/test-install-machine-without-system/hardware-configuration.nix")
assert os.path.exists(hw_config_without_system_file), "hardware-configuration.nix should exist after update"
'';
} { inherit pkgs self; };
};
};
}

View File

@@ -0,0 +1,44 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "nixos-test-lib"
version = "1.0.0"
description = "NixOS test utilities for clan VM testing"
authors = [
{name = "Clan Core Team"}
]
dependencies = []
[project.optional-dependencies]
dev = [
"mypy",
"ruff"
]
[tool.setuptools.packages.find]
where = ["."]
include = ["nixos_test_lib*"]
[tool.setuptools.package-data]
"nixos_test_lib" = ["py.typed"]
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D", # docstrings
"ANN", # type annotations
"COM812", # trailing comma
"ISC001", # string concatenation
]

View File

@@ -0,0 +1,173 @@
{
lib,
pkgs,
self,
...
}:
let
# Common target VM configuration used by both installation and update tests
target =
{ modulesPath, pkgs, ... }:
{
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 = [
pkgs.nixos-facter
];
# Disable cache.nixos.org to speed up tests
nix.settings.substituters = [ ];
nix.settings.trusted-public-keys = [ ];
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;
users.users.nonrootuser = {
isNormalUser = true;
openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
extraGroups = [ "wheel" ];
};
users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
# Allow users to manage their own SSH keys
services.openssh.authorizedKeysFiles = [
"/root/.ssh/authorized_keys"
"/home/%u/.ssh/authorized_keys"
"/etc/ssh/authorized_keys.d/%u"
];
security.sudo.wheelNeedsPassword = false;
};
# Common base test machine configuration
baseTestMachine =
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/testing/test-instrumentation.nix")
(modulesPath + "/profiles/qemu-guest.nix")
self.clanLib.test.minifyModule
];
# Enable SSH and add authorized key for testing
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
users.users.nonrootuser = {
isNormalUser = true;
openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
extraGroups = [ "wheel" ];
home = "/home/nonrootuser";
createHome = true;
};
users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ../assets/ssh/pubkey) ];
# Allow users to manage their own SSH keys
services.openssh.authorizedKeysFiles = [
"/root/.ssh/authorized_keys"
"/home/%u/.ssh/authorized_keys"
"/etc/ssh/authorized_keys.d/%u"
];
security.sudo.wheelNeedsPassword = false;
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 = "/";
};
};
};
};
};
};
};
};
# NixOS test library combining port utils and clan VM test utilities
nixosTestLib = pkgs.python3Packages.buildPythonPackage {
pname = "nixos-test-lib";
version = "1.0.0";
format = "pyproject";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./pyproject.toml
./nixos_test_lib
];
};
nativeBuildInputs = with pkgs.python3Packages; [
setuptools
wheel
];
doCheck = false;
};
# Common closure info
closureInfo = pkgs.closureInfo {
rootPaths = [
self.checks.x86_64-linux.clan-core-for-checks
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.initialRamdisk
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.buildPackages.xorg.lndir
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
};
in
{
inherit
target
baseTestMachine
nixosTestLib
closureInfo
;
}

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) {
nixos-test-morph = self.clanLib.test.baseTest {
name = "morph";
nodes = {
@@ -32,12 +32,9 @@
{ pkgs, ... }:
let
dependencies = [
self
pkgs.nixos-anywhere
pkgs.stdenv.drvPath
pkgs.stdenvNoCC
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
self.nixosConfigurations.test-morph-machine.config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
@@ -45,14 +42,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 +0,0 @@
(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";
}
];
};
in
{
name = "mumble";
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()
with subtest("Waiting for x"):
peer1.wait_for_x()
peer2.wait_for_x()
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 &")
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$")
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("Wait for server connect"):
peer1.wait_for_window(r"^Mumble Server Connect$")
peer2.wait_for_window(r"^Mumble Server Connect$")
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.")
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.")
'';
}
)

View File

@@ -1,22 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUCUjfNkF0CDhTKbO3nNczcsCW4qEwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTM2NDZaFw0yNDA3
MjcwOTM2NDZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDCcdZEJvXJIeOKO5pF5XUFvUeJtCCiwfWvWS662bxc
R/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS4zSGQoTEAVzqzVdi3a/gNvsdVLb+
7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfdWV1Y5T1tuwc3G8ATrguQ33Uo5vvF
vcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIhjMpRG/uZ3u7wtbyZ+WqjsjxZNfnY
aMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2ZqhVSYXyDfpAWQFznwKGzD5mjtcyKym
gnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4KnID30OQW7AgMBAAGjUzBRMB0GA1Ud
DgQWBBQBBO8Wp975pAGioMjkaxANAVInfzAfBgNVHSMEGDAWgBQBBO8Wp975pAGi
oMjkaxANAVInfzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAg
F40MszTZXpR/A1z9B1CcXH47tNK67f8bCMR2dhvXODbpatwSihyxhQjtLb5R6kYH
5Yq/B4yrh303j0CXaobCQ4nQH7zI7fhViww+TzW7vDhgM7ueEyyXrqCXt6JY8avg
TuvIRtJSeWSQJ5aLNaYqmiwMf/tj9W3BMDpctGyLqu1WTSrbpYa9mA5Vudud70Yz
DgZ/aqHilB07cVNqzVYZzRZ56WJlTjGzVevRgnHZqPiZNVrU13H6gtWa3r8aV4Gj
i4F663eRAttj166cRgfl1QqpSG2IprNyV9UfuS2LlUaVNT3y0idawiJ4HhaA8pGB
ZqMUUkA4DSucb6xxEcTK
-----END CERTIFICATE-----

View File

@@ -1 +0,0 @@
AGE-SECRET-KEY-1UCXEUJH6JXF8LFKWFHDM4N9AQE2CCGQZGXLUNV4TKR5KY0KC8FDQ2TY4NX

View File

@@ -1,14 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICHTCCAaKgAwIBAgIIT2gZuvqVFP0wCgYIKoZIzj0EAwIwSjESMBAGA1UEChMJ
U3luY3RoaW5nMSAwHgYDVQQLExdBdXRvbWF0aWNhbGx5IEdlbmVyYXRlZDESMBAG
A1UEAxMJc3luY3RoaW5nMB4XDTIzMTIwNjAwMDAwMFoXDTQzMTIwMTAwMDAwMFow
SjESMBAGA1UEChMJU3luY3RoaW5nMSAwHgYDVQQLExdBdXRvbWF0aWNhbGx5IEdl
bmVyYXRlZDESMBAGA1UEAxMJc3luY3RoaW5nMHYwEAYHKoZIzj0CAQYFK4EEACID
YgAEBAr1CsciwCa0vi7eC6xxuSGijY3txbjtsyFanec/fge4oJBD3rVpaLKFETb3
TvHHsuvblzElcP483MEVq6FMUoxwuL9CzTtpJrRhtwSmAs8AHLFu8irVn8sZjgkL
sXMho1UwUzAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG
AQUFBwMCMAwGA1UdEwEB/wQCMAAwFAYDVR0RBA0wC4IJc3luY3RoaW5nMAoGCCqG
SM49BAMCA2kAMGYCMQDbrtLgfcyMMIkNQn+PJe9DHYAqj8C47LQcWuIY/nekhOu0
aUfKctEAwyBtI60Y5zcCMQCEdgD/6CNBh7Qqq3z3CKPhlrpxHtCO5tNw17k0jfdH
haCwJInHZvZgclHk4EtFpTw=
-----END CERTIFICATE-----

View File

@@ -1,6 +0,0 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDA14Nqo17Xs/xRLGH2KLuyzjKp4eW9iWFobVNM93RZZbECT++W3XcQc
cEc5WVtiPmWgBwYFK4EEACKhZANiAAQECvUKxyLAJrS+Lt4LrHG5IaKNje3FuO2z
IVqd5z9+B7igkEPetWlosoURNvdO8cey69uXMSVw/jzcwRWroUxSjHC4v0LNO2km
tGG3BKYCzwAcsW7yKtWfyxmOCQuxcyE=
-----END EC PRIVATE KEY-----

View File

@@ -1,22 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUfENbTtH5nr7giuawwQpDYqUpWJswDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTQxNDNaFw0yNDA3
MjcwOTQxNDNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCfP6cZhCs9jOnWqyQP12vrOOxlBrWofYZFf9amUA24
AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEvHujKyy8PgcEGP+pwmsfWNQMvU0Dz
j3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU1l7fO/OXUlq5kyvIjln7Za4sUHun
ixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjGG+R6MccH8wwQwmLg5oVBkFEZrnRE
pnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f8TYGHqbeMQFCKwusnlWPRtrNdaIc
gaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO0Bwx8fmRAgMBAAGjUzBRMB0GA1Ud
DgQWBBR7r+mQWNUZ0TpQNwrwjgxgngvOjTAfBgNVHSMEGDAWgBR7r+mQWNUZ0TpQ
NwrwjgxgngvOjTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCO
7B4s6uQEGE8jg3CQgy76oU/D8sazGcP8+/E4JLHSc0Nj49w4ztSpkOVk2HyEtzbm
uR3TreIw+SfqpbiOI/ivVNDbEBsb/vEeq7qPzDH1Bi72plHZNRVhNGGV5rd7ibga
TkfXHKPM9yt8ffffHHiu1ROvb8gg2B6JbQwboU4hvvmmorW7onyTFSYEzZVdNSpv
pUtKPldxYjTnLlbsJdXC4xyCC4PrJt2CC0n0jsWfICJ77LMxIxTODh8oZNjbPg6r
RdI7U/DsD+R072DjbIcrivvigotJM+jihzz5inZwbO8o0WQOHAbJLIG3C3BnRW3A
Ek4u3+HXZMl5a0LGJ76u
-----END CERTIFICATE-----

View File

@@ -1,14 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICHjCCAaOgAwIBAgIJAKbMWefkf1rVMAoGCCqGSM49BAMCMEoxEjAQBgNVBAoT
CVN5bmN0aGluZzEgMB4GA1UECxMXQXV0b21hdGljYWxseSBHZW5lcmF0ZWQxEjAQ
BgNVBAMTCXN5bmN0aGluZzAeFw0yMzEyMDYwMDAwMDBaFw00MzEyMDEwMDAwMDBa
MEoxEjAQBgNVBAoTCVN5bmN0aGluZzEgMB4GA1UECxMXQXV0b21hdGljYWxseSBH
ZW5lcmF0ZWQxEjAQBgNVBAMTCXN5bmN0aGluZzB2MBAGByqGSM49AgEGBSuBBAAi
A2IABFZTMt4RfsfBue0va7QuNdjfXMI4HfZzJCEcG+b9MtV7FlDmwMKX5fgGykD9
FBbC7yiza3+xCobdMb5bakz1qYJ7nUFCv1mwSDo2eNM+/XE+rJmlre8NwkwGmvzl
h1uhyqNVMFMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr
BgEFBQcDAjAMBgNVHRMBAf8EAjAAMBQGA1UdEQQNMAuCCXN5bmN0aGluZzAKBggq
hkjOPQQDAgNpADBmAjEAwzhsroN6R4/quWeXj6dO5gt5CfSTLkLee6vrcuIP5i1U
rZvJ3OKQVmmGG6IWYe7iAjEAyuq3X2wznaqiw2YK3IDI4qVeYWpCUap0fwRNq7/x
4dC4k+BOzHcuJOwNBIY/bEuK
-----END CERTIFICATE-----

View File

@@ -1,6 +0,0 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCXHGpvumKjjDRxB6SsjZOb7duw3w+rdlGQCJTIvRThLjD6zwjnyImi
7c3PD5nWtLqgBwYFK4EEACKhZANiAARWUzLeEX7HwbntL2u0LjXY31zCOB32cyQh
HBvm/TLVexZQ5sDCl+X4BspA/RQWwu8os2t/sQqG3TG+W2pM9amCe51BQr9ZsEg6
NnjTPv1xPqyZpa3vDcJMBpr85Ydboco=
-----END EC PRIVATE KEY-----

View File

@@ -1 +0,0 @@
AGE-SECRET-KEY-1UCXEUJH6JXF8LFKWFHDM4N9AQE2CCGQZGXLUNV4TKR5KY0KC8FDQ2TY4NX

View File

@@ -1,22 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUCUjfNkF0CDhTKbO3nNczcsCW4qEwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTM2NDZaFw0yNDA3
MjcwOTM2NDZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDCcdZEJvXJIeOKO5pF5XUFvUeJtCCiwfWvWS662bxc
R/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS4zSGQoTEAVzqzVdi3a/gNvsdVLb+
7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfdWV1Y5T1tuwc3G8ATrguQ33Uo5vvF
vcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIhjMpRG/uZ3u7wtbyZ+WqjsjxZNfnY
aMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2ZqhVSYXyDfpAWQFznwKGzD5mjtcyKym
gnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4KnID30OQW7AgMBAAGjUzBRMB0GA1Ud
DgQWBBQBBO8Wp975pAGioMjkaxANAVInfzAfBgNVHSMEGDAWgBQBBO8Wp975pAGi
oMjkaxANAVInfzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAg
F40MszTZXpR/A1z9B1CcXH47tNK67f8bCMR2dhvXODbpatwSihyxhQjtLb5R6kYH
5Yq/B4yrh303j0CXaobCQ4nQH7zI7fhViww+TzW7vDhgM7ueEyyXrqCXt6JY8avg
TuvIRtJSeWSQJ5aLNaYqmiwMf/tj9W3BMDpctGyLqu1WTSrbpYa9mA5Vudud70Yz
DgZ/aqHilB07cVNqzVYZzRZ56WJlTjGzVevRgnHZqPiZNVrU13H6gtWa3r8aV4Gj
i4F663eRAttj166cRgfl1QqpSG2IprNyV9UfuS2LlUaVNT3y0idawiJ4HhaA8pGB
ZqMUUkA4DSucb6xxEcTK
-----END CERTIFICATE-----

View File

@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCcdZEJvXJIeOK
O5pF5XUFvUeJtCCiwfWvWS662bxcR/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS
4zSGQoTEAVzqzVdi3a/gNvsdVLb+7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfd
WV1Y5T1tuwc3G8ATrguQ33Uo5vvFvcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIh
jMpRG/uZ3u7wtbyZ+WqjsjxZNfnYaMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2Zqh
VSYXyDfpAWQFznwKGzD5mjtcyKymgnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4Kn
ID30OQW7AgMBAAECggEAGVKn+/Iy+kG+l2cRvV6XseqnoWhjA69M5swviMgIfuAl
Xx/boeI4mwoS+dJQKi/0zEbB1MB+gwIDB/0s/vs0vS4MQswBQG/skr+2TmiU+Hgb
CF0dIYUZv5rAbScFTumx/mCCqxwc+1QIMzyLKqOYL203EFc92ZJGEVT4th321haZ
8Wd+dllcYAb7BbEeBhCrTqRe9T3zt5reZgtZTquTF5hGm8EAyBp6rLjZK7dyZ9dd
gyIsDbWgPC9vkRc6x/eANn70hgDbYOuoXwAP/qIFnWLL1Zzy8LKUyOsSgQ91S3S3
Il4Lt6lEyU3+61MsCYss7jDoP/7REEjz5h6gfxlFSQKBgQD9u8nhHuwte4/d9VNU
rhSBW9h8IJzwPif/eS8vh9VaS2SjR2dDCcHg6rGYKnexeEzUcx56aQMA+p3nRJwy
Uwnx5BfEWs9FO6yPR8VEI0a2sBp+hoWKJX/Lvat+QCs6IFuGmlQpczD7/RYAkhG4
mwyt/ymqzjukb9mFaeYIltOfPwKBgQDELnkH1ChTUH5u3HgDoelFbzR18okz6dxH
urMbfZMAl8W5h2zAvHsAX5qxyHHankOUsiH2y3BrAgqQtTuIA2a5W7j+yHBkYiEZ
EUNeI9YNA0KU+wwZpVVvRGUsRB5SUBo5LlcSYmX/V32f0oU5Np44i0vjl3Ju8esx
2MLfj1A2hQKBgQDCxtZZZ0h8Pb8Z7wpSFfQNvXi5CLwQvFYuClQLk6VXVErkAJsn
XiUjyGYeXnNVm/i2mcyKwXQZ20k90HBrPU2ED8mi5Ob5ya5Uqw6mmMHe2d7sw81d
WB37RBWSrCXC0DYSZQQ4cYHn3sd2Fqtd4EBijV7qDLjCKU582OdKLqYzNwKBgH31
UKQkJZgIkIThbPT4GewI0GgCRvFb76DmUGUQJTg2Oi86siq1WUwOFiabie5RuxZX
oNLyH8W008/BbO2RMX1FVOvRCciJ8LJFkTl6TM6iDzfUUBqPOuFryoG3Yrh60btw
81rMbqyZIgFhi0QGu2OWnC0Oadyt2tJwV/5t55R5AoGBAPspZttDmOzVkAJDSn9Z
iByYt1KmwBQ6l7LpFg33a7ds9zWqW4+i6r0PzXvSewf/z69L0cAywSk5CaJJjDso
dTlNMqwux01wd6V+nQGR871xnsOg+qzgJ565TJZelWgRmNRUooi4DMp5POJA33xp
rqAISUfW0w2S+q7/5Lm0QiJE
-----END PRIVATE KEY-----

View File

@@ -1,22 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUfENbTtH5nr7giuawwQpDYqUpWJswDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTQxNDNaFw0yNDA3
MjcwOTQxNDNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCfP6cZhCs9jOnWqyQP12vrOOxlBrWofYZFf9amUA24
AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEvHujKyy8PgcEGP+pwmsfWNQMvU0Dz
j3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU1l7fO/OXUlq5kyvIjln7Za4sUHun
ixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjGG+R6MccH8wwQwmLg5oVBkFEZrnRE
pnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f8TYGHqbeMQFCKwusnlWPRtrNdaIc
gaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO0Bwx8fmRAgMBAAGjUzBRMB0GA1Ud
DgQWBBR7r+mQWNUZ0TpQNwrwjgxgngvOjTAfBgNVHSMEGDAWgBR7r+mQWNUZ0TpQ
NwrwjgxgngvOjTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCO
7B4s6uQEGE8jg3CQgy76oU/D8sazGcP8+/E4JLHSc0Nj49w4ztSpkOVk2HyEtzbm
uR3TreIw+SfqpbiOI/ivVNDbEBsb/vEeq7qPzDH1Bi72plHZNRVhNGGV5rd7ibga
TkfXHKPM9yt8ffffHHiu1ROvb8gg2B6JbQwboU4hvvmmorW7onyTFSYEzZVdNSpv
pUtKPldxYjTnLlbsJdXC4xyCC4PrJt2CC0n0jsWfICJ77LMxIxTODh8oZNjbPg6r
RdI7U/DsD+R072DjbIcrivvigotJM+jihzz5inZwbO8o0WQOHAbJLIG3C3BnRW3A
Ek4u3+HXZMl5a0LGJ76u
-----END CERTIFICATE-----

View File

@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfP6cZhCs9jOnW
qyQP12vrOOxlBrWofYZFf9amUA24AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEv
HujKyy8PgcEGP+pwmsfWNQMvU0Dzj3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU
1l7fO/OXUlq5kyvIjln7Za4sUHunixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjG
G+R6MccH8wwQwmLg5oVBkFEZrnREpnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f
8TYGHqbeMQFCKwusnlWPRtrNdaIcgaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO
0Bwx8fmRAgMBAAECggEACAkjOnNj5zA0IIP0RuRc6rqtmw9ynTTwUJN51lyVxKI8
dQDMEq/S2En+J2VyS7z92/XtbgkBIFx83u7VWl5UWpj2j4UsJFB7IwD7zyiJT4D+
+3cM/kX8Wx4XyQZbfbm47N0MXAgFCkn45hxHH0acLReXwmN9wxoDyl7AIjZRdwvG
Qq0rnOnIc8kkkew7L6AiFwQS8b77eyzua3d6moKXN9hU/kfiJ6YUFG/WLe0pmQA1
HbF27YghfeLnYUt50oDuX6jF6CzQhflchWVq/wn8/cxEpg/RMicWE8ulrTk7o27l
JwCrHrhYEBsPuZO4mxX/DHrAMmhTeFjLaV5bQlz0PQKBgQDgRPSOEixYnKz9iPs/
EDTlji5LA3Rm6TytRCNsjYY6Trw60KcvYqwyDUCiEjruvOQ9mqgBiQm1VHSalrG3
RcbVfpEMouyZbEwmTjS8KdOi5x4Z6AX+4yWDN31jX3b8sktgbxV/HRdg3sA3q7MJ
vExTUuoXg57W+FepIZ+XlhSoQwKBgQC1x6UMAlAeW45/yUUm/LFRcCgb/bdCQx+e
hSb8w3jdvVoNWgx1j7RsjjFKaZUnseK3qQvVfCm4Qjvlz6MpKDxslaUYuR162Ku0
e153z/xc7XRoXyPyPLdGZFlWii30jirB7ZqPdyz6mwlWwqdImNerbUqdFt9R8bId
pYsyHB5zmwKBgBjYCq9iW/9E+/TqI8sMpI95fK9app5v4AThs3rnAqOa7Ucmrh6V
s7Wnui06D8U6r54Tb+EbqTOpM3Gcl/tRg4FLEA5yTfuA/76Ok1D04Tj+mVsNVPyz
dQhgMUe835WGusroA12df2V/x5NjNeYyMdJZMQ2ByyrNQAjAbMmCGq+5AoGBAIj8
ERFysMOfxUvg9b7CkDFJrsAhOzew86P2vYGfIHchGTqUkG0LRTDFGrnzxNXsBGjY
+DUB40Kajx7IkTETxC0jvA1ceq23l/VjPrZVQt0YiC+a+rCyNn7SYkyHxsfTVr9b
ea0BZyDXMntyJrPbkjL6Ik8tDE9pLwuOU84ISJ5fAoGAZ2+Ams/VhdZj/wpRpMky
K4jtS4nzbCmJzzTa6vdVV7Kjer5kFxSFFqMrS/FtJ/RxHeHvxdze9dfGu9jIdTKK
vSzbyQdHFfZgRkmAKfcoN9u567z7Oc74AQ9UgFEGdEVFQUbfWOevmr8KIPt8nDQK
J9HuVfILi1kH0jzDd/64TvA=
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,53 @@
{
pkgs,
nixosLib,
clan-core,
...
}:
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosTest.clanTest
];
hostPkgs = pkgs;
name = "service-mycelium";
clan = {
test.useContainers = false;
directory = ./.;
modules."@clan/mycelium" = ../../clanServices/mycelium/default.nix;
inventory = {
machines.server = { };
instances = {
mycelium-test = {
module.name = "@clan/mycelium";
module.input = "self";
roles.peer.machines."server".settings = {
openFirewall = true;
addHostedPublicNodes = true;
};
};
};
};
};
nodes = {
server = { };
};
testScript = ''
start_all()
# Check that mycelium service is running
server.wait_for_unit("mycelium")
server.succeed("systemctl status mycelium")
# Check that mycelium is listening on its default port
server.wait_until_succeeds("${pkgs.iproute2}/bin/ss -tulpn | grep -q 'mycelium'", 10)
'';
}
)

View File

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

View File

@@ -0,0 +1,15 @@
{
"data": "ENC[AES256_GCM,data:hLJS+CJllYM50KxKuiYamxBLGd9lwoeIFapP9mZAlVGH5DSenylcKUfsphxafASoB516qns2DznBoS9mWqg9uTsRZjk4WlR3x6A=,iv:uRiIpUKIiV3riNcBAWUqhZbE+Vb7lLMfU0C/TClVZ6M=,tag:4+nsMssiSyq9Iv7sDuWmoQ==,type:str]",
"sops": {
"age": [
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBPUWFOMzluRmdOQXBmRjRN\ncXNSUlB5Z0t6dWYxNVkvMmhrN1FDdmxHcTNJCkhPL3BYMFFXMmU5ZGRqOC9KWEgv\nSHB5OUJqTk5Dd0tDTks1R1ZhYktrLzgKLS0tIHJIMlFRVWphZXlISmR3VUJKUjNk\ndWF4eCt6UHBrSndBay95RVJ3dldiaFkKCgYqrt0aCGRTaHycBoeqv/zeByu2ZZ3Z\nVfgxnD9liIQkS2wERbpk0/Yq9wkKgVxj+DZoWwHYhP0eKCw2UOorCA==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-06-04T11:54:59Z",
"mac": "ENC[AES256_GCM,data:xoeOz7FRCPJ18UTsfbY1x/N65pxbTsehT9Kv3MgEd6NQJn6FTvquaj3HEZ0KvIzStBz1FNOhSql9CZUFc4StYps05EbX61MMMnz6Nlj3xcTwuVQFabGoinxcXbCDSA+tAW7VqzVxumj6FMDg+r77gdcIApZjGJg4Z9ws2RZd3u4=,iv:U8IUDwmfg8Umob9mtKgGaKoIY4SKNL895BABJxzx5n8=,tag:tnMCx6D/17ZYgI6SgNS29A==,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 @@
52d:87c1:4222:b550:ee01:a7ae:254:5a66

View File

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

View File

@@ -0,0 +1,19 @@
{
"data": "ENC[AES256_GCM,data:DGzl2G4H+NkwXq0fCUQS0+8FG1x9xoIsYvAgUxP4Qp8=,iv:CXOJVgYNthVOZ4vbdI3n4KLXSFVemzaoEnRGMC+m0i8=,tag:/u+pV3xWpUq0ZtAm6LKuGQ==,type:str]",
"sops": {
"age": [
{
"recipient": "age122lc4fvw2p22gcvwqeme5k49qxtjanqkl2xvr6qvf3r0zyh7scuqz28cam",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZZHZjdXMwclBTeGthcGpM\nV1ArVy83akNHNEpXVFhoR1FWNlJUeHNKTW00CjJFTFZneFNrL0hDMXJpaTQ2M1ln\nTmdPMGhzeUp0NU55QnhCZEU2QVk1OG8KLS0tIDFhQmJhOHJsTjhYNEhITEw0WFgy\nWC9pTi9od0wyMWtZRVZJYWo0Nmo5SHMKDohnAAfrnGOiw55huMme2EEWE53N/feS\nutvbiTZh1ECHCi/uoK757fjnJ/WrQMSxUpctT9I8bpJRtbTqkx3XRw==\n-----END AGE ENCRYPTED FILE-----\n"
},
{
"recipient": "age1qm0p4vf9jvcnn43s6l4prk8zn6cx0ep9gzvevxecv729xz540v8qa742eg",
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZeTZENGFpWndDbmdsWDRw\nMTBCVXg5Zkg2a2s5Yk1HSERIVlVQRXdUSUNnCnREbno0dEN0ZEgvOFNMRG1ReGx4\na0h1YUFuMkxBZXJUTE9xOUVUMitEalkKLS0tIFZMZ21qclRqUFR0dlAyMFkzdUNX\nNjRLTWVRVWtHSDlDakEzMmpRVWkyc0EKabm8mTKJVxQNTaIgU+8rb/xk9Dpg+Zjz\nb+wgD0+TlARlenMtIub8Y6N06ENOc20oovylfu+g7xV+EkvRPCd6tA==\n-----END AGE ENCRYPTED FILE-----\n"
}
],
"lastmodified": "2025-06-04T11:55:02Z",
"mac": "ENC[AES256_GCM,data:UIBaD/3mACgFzkajkFXz3oKai8IxpYQriR2t0mc5fL92P5ECloxCobY386TDZYOEVrDJ45Bw+IzqZbsCx/G9f1xCCTR2JvqygxYIsK3TpQPsboJzb9Cz3dBNBCXGboVykcg/NobEMaJBw1xtdAQBhuo8S7ymIuOPtGz0vPFJkf8=,iv:g0YAOBsRpgAOikKDMJDyOtcVx+0QwetfA8R6wQFH7lY=,tag:sfdFLjtiqFHdP/Qe1suBBQ==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.10.2"
}
}

View File

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

View File

@@ -0,0 +1 @@
2125c6b039374467eaa3eaf552bd3e97f434d16006433cfbba3e6823c958b728

View File

@@ -1,4 +1,4 @@
(import ../lib/container-test.nix) ({
({
name = "postgresql";
nodes.machine =

View File

@@ -1,4 +1,4 @@
(import ../lib/test-base.nix) {
{
name = "secrets";
nodes.machine =
@@ -11,7 +11,6 @@
sops.age.keyFile = "/etc/privkey.age";
clan.core.settings.directory = "${./.}";
clan.core.settings.machine.name = "machine";
networking.hostName = "machine";
};

View File

@@ -0,0 +1,66 @@
{
pkgs,
nixosLib,
clan-core,
...
}:
nixosLib.runTest (
{ hostPkgs, config, ... }:
{
imports = [
clan-core.modules.nixosTest.clanTest
];
hostPkgs = pkgs;
# This tests the compatibility of the inventory
# With the test framework
# - legacy-modules
# - clan.service modules
name = "service-dummy-test-from-flake";
clan.test.fromFlake = ./.;
extraPythonPackages = _p: [
clan-core.legacyPackages.${hostPkgs.system}.nixosTestLib
];
testScript =
{ nodes, ... }:
''
from nixos_test_lib.nix_setup import setup_nix_in_nix # type: ignore[import-untyped]
setup_nix_in_nix(None) # No closure info for this test
def run_clan(cmd: list[str], **kwargs) -> str:
import subprocess
clan = "${clan-core.packages.${hostPkgs.system}.clan-cli}/bin/clan"
clan_args = ["--flake", "${config.clan.test.flakeForSandbox}"]
return subprocess.run(
["${hostPkgs.util-linux}/bin/unshare", "--user", "--map-user", "1000", "--map-group", "1000", clan, *cmd, *clan_args],
**kwargs,
check=True,
).stdout
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}"
run_clan(["machines", "list"])
'';
}
)

View File

@@ -0,0 +1,71 @@
{
inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
inputs.nixpkgs.follows = "clan-core/nixpkgs";
outputs =
{ self, clan-core, ... }:
let
# Usage see: https://docs.clan.lol
clan = clan-core.lib.clan {
inherit self;
inventory =
{ ... }:
{
meta.name = "foo";
machines.peer1 = { };
machines.admin1 = { };
services = {
legacy-module.default = {
roles.peer.machines = [ "peer1" ];
roles.admin.machines = [ "admin1" ];
};
};
instances."test" = {
module.name = "new-service";
module.input = "self";
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/service-dummy-test service-dummy-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
'';
};
};
};
};
};
in
{
# all machines managed by Clan
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
};
}

View File

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

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