Commit Graph

356 Commits

Author SHA1 Message Date
Qubasa
68b7c22faf clan-cli: init machine from inventory 2025-06-12 16:36:55 +02:00
Qubasa
e27bb956c9 clan-lib: Add LogManager class 2025-06-12 16:24:40 +02:00
Qubasa
25a6108198 clan-lib: Move task functions to own file 2025-06-12 16:23:53 +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
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
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
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
10cf0bfafe Feat(inventoryStore): add get_raw to read all the values unsafe 2025-06-10 17:02:16 +02:00
Johannes Kirschbauer
f6102e5ae7 Chore(show_clan_meta): use data from inventoryStore 2025-06-10 16:46:18 +02: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
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
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
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
hsjobeki
4faec2c4d2 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
Qubasa
b1ef5f00bf clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser 2025-06-07 00:51:24 +02:00
lassulus
d3d5cd70cb 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
lassulus
4d07e90930 select: fix error message showing nonsense 2025-06-06 10:12:15 +02:00
lassulus
e96099d588 select: fix non escaped ' 2025-06-06 10:12:15 +02:00
Qubasa
4fa73e4b92 clan_lib: Fix quoting issues 2025-06-05 17:24:36 +02:00
Johannes Kirschbauer
730ab8a25e Chore(specific_machine_dir): use protocol to avoid direct dependency on machine class 2025-06-04 20:51:27 +02:00
Johannes Kirschbauer
ea1c1a5185 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
6679a64dea 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
Johannes Kirschbauer
ac0477e710 Fix(inventory/extraModules): use more narrow type for better persistence 2025-06-03 18:57:34 +02:00
Johannes Kirschbauer
724e307cac Chore: update clan nix_models 2025-06-03 18:18:12 +02:00
Johannes Kirschbauer
77c2fc7ba1 chore: delete duplicate inventory models 2025-06-03 17:52:07 +02:00
Jörg Thalheim
97209c53e4 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
Michael Hoang
06d0612b5f cli: allow using commands from local flakerefs for debugging 2025-06-03 14:07:45 +10:00
Qubasa
2bbf97199f clan-cli: Fix test_create::test_clan_create_api 2025-06-02 15:39:50 +02:00
Qubasa
ae41bfad8c inventory: Add buildHost argument 2025-06-02 14:52:13 +02:00
hsjobeki
526a992101 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