Commit Graph

3362 Commits

Author SHA1 Message Date
lassulus
6aaedaa6df generate_test_vars: add support for darwin 2025-06-12 14:49:12 +02:00
Brian McGee
ec62419668 feat(ui): new loader component; button and icon v2 2025-06-12 11:29:41 +01:00
Johannes Kirschbauer
abee3147ea Fix(morph): ensure machine dir exists 2025-06-11 20:38:15 +02:00
Johannes Kirschbauer
fafb4d8b4e fix(templates): add error handling 2025-06-11 20:22:20 +02:00
Johannes Kirschbauer
1724f127d5 feat(templates_urls): short circuit input names 2025-06-11 20:21:29 +02:00
Johannes Kirschbauer
32b5b7dc93 feat(flake): add function to get input names 2025-06-11 20:21:29 +02:00
Johannes Kirschbauer
6b684c45c3 feat(flake/select): add apply argument 2025-06-11 20:21:29 +02:00
Johannes Kirschbauer
799c23bb56 doc(cli/templates): improve help description 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
a254ff46a1 fix(tess/morph): skip creating existing machine 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
b5ed9fdfed Docs(cli/machines): improve description of '--template' 2025-06-11 17:00:10 +02:00
Johannes Kirschbauer
1e3e7b6d37 Chore(machine/templates): simplify template args for machines command 2025-06-11 17:00:08 +02:00
Johannes Kirschbauer
1249a18901 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
0280d3a6a6 Feat(templates): init with_machine_template context handler 2025-06-11 16:52:52 +02:00
Johannes Kirschbauer
5acac54f48 Feat(templates): add template selector tranformation 2025-06-11 16:52:50 +02:00
lassulus
19b8d67115 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
32559c0424 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
lassulus
3784682c3a clan-cli: reduce ssh controlmaster timeout to 1min 2025-06-11 14:39:50 +02:00
adeci
ad5ab560b4 bugfix for persistent loginctl sessions 2025-06-11 14:38:37 +02:00
DavHau
6f451c700d 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
a-kenji
ae2d9e57ab 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
kenji
600310f263 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
6b206deb72 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
hsjobeki
fb842ba846 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
Johannes Kirschbauer
92fdba3965 Chore(templates): move helper functions into a util file 2025-06-10 19:38:10 +02:00
Johannes Kirschbauer
a98b2fb60c Chore(complete_machines): simplify by using inventoryStore 2025-06-10 19:15:07 +02:00
Johannes Kirschbauer
7d3b5ecec9 Chore(flake.py): remove unused uncached_nix_eval_with_args 2025-06-10 19:15:07 +02:00
Johannes Kirschbauer
80ead1bf4d Refactor(clanInternals): remove depending on clanInternals.inventory 2025-06-10 17:43:59 +02:00
hsjobeki
78e719f5fb 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
8de654f381 Refactor(autocompletions): use inventoryStore 2025-06-10 17:02:16 +02:00
Johannes Kirschbauer
10cf0bfafe Feat(inventoryStore): add get_raw to read all the values unsafe 2025-06-10 17:02:16 +02:00
hsjobeki
6a279157bd 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
f6102e5ae7 Chore(show_clan_meta): use data from inventoryStore 2025-06-10 16:46:18 +02:00
Johannes Kirschbauer
20618d11fd Fix(tests/substitutions): use different substitutions for nix-build and local environment 2025-06-10 15:34:56 +02:00
Johannes Kirschbauer
afc441c376 Fix(tests/templates): add narHash to allow local tests execution in devShell 2025-06-10 12:36:58 +02:00
Michael Hoang
6dd6a641f5 cli: fix clan secrets key update not working when age plugins defined 2025-06-10 14:07:10 +07:00
hsjobeki
931f0b00d0 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
ca8a228fba chore(flake): move 'inputs-from' into templates handling 2025-06-09 20:40:20 +02:00
Johannes Kirschbauer
217df6b98c chore(inspect): use simple list_machines 2025-06-09 20:33:17 +02:00
Johannes Kirschbauer
7a1cab1412 chore(api/create_clan): remove unused reponse class 2025-06-09 20:30:20 +02:00
Qubasa
ee802ad723 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
b81d0e9ba6 testing: fix Nix in Nix when remote building 2025-06-09 20:58:08 +07:00
DavHau
d37c7c4c05 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
hsjobeki
78c0ad24d9 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
2685db33d7 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
57e71e6c66 Refactor(api/list_machines): rename from list_inv_machines 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
e65cba43f7 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
7c4b836963 refactor(clan_lib): move show_clan_meta to clan_lib 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
ad948ec097 refactor(clan_lib): move update to clan_lib.clan 2025-06-09 13:33:25 +02:00
Johannes Kirschbauer
7f478bffe2 Refactor(api/update_machine): rename to set_machine; use name, flake 2025-06-09 13:33:19 +02:00
lassulus
8ce860f0d3 Revert "clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser"
This reverts commit b1ef5f00bf.
2025-06-09 11:28:15 +02:00