Commit Graph

199 Commits

Author SHA1 Message Date
a-kenji
5a81adfc68 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
Johannes Kirschbauer
66ee74e193 schema: update clan option source 2025-06-26 13:24:34 +02:00
Qubasa
43df077dda clan-app: Add a 'group' to log_manager. Move log_manager to own subdirectory 2025-06-24 21:42:18 +02:00
Qubasa
cb2097c1e5 clan-cli: Remove unecessary nix_options args from functions 2025-06-24 19:07:41 +02:00
Qubasa
cd1d49b603 clan-lib: Move nix_options from Machine class to Flake class 2025-06-24 19:03:20 +02:00
Luis Hebendanz
20080f8857 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
2ec23b96cf 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
d477018e72 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
pinpox
7fc8776742 Merge branch 'main' into machine-id-option 2025-06-24 11:12:24 +00:00
Qubasa
6e4dc03b1d clan-cli: Move update.py to clan_lib/machines 2025-06-24 12:17:21 +02:00
Qubasa
2bfc33bc31 clan-cli: Move delete.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
Qubasa
21b0c00c05 clan-cli: Move list.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
Qubasa
d65bdb30eb clan-cli: Move morph.py to clan_lib/machines 2025-06-24 12:16:38 +02:00
DavHau
7745e9eec6 inventory interface: add description for module.name 2025-06-24 10:09:05 +00:00
Qubasa
ded7f0eb39 clan-cli: Move list.py to clan_lib/machines 2025-06-24 11:57:02 +02:00
pinpox
b0575e79e1 Merge branch 'main' into machine-id-option 2025-06-24 09:41:42 +00:00
Qubasa
f09656bbf6 clan-cli: Move delete.py to clan_lib/machines 2025-06-24 11:37:21 +02:00
Qubasa
0451f917ed clan-cli: Move list.py to clan_lib/machines 2025-06-24 11:32:42 +02:00
Qubasa
20822c932d clan-cli: Move morph.py to clan_lib/machines 2025-06-24 11:24:38 +02:00
Qubasa
168e1d8c96 clan-cli: Move hardware.py to clan_lib/machines 2025-06-24 11:07:37 +02:00
pinpox
d88ac429cb Make machine ID a option 2025-06-24 10:42:03 +02:00
hsjobeki
29199e96da 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
Johannes Kirschbauer
1ceec8ba8a Chore(classes): update classes 2025-06-23 16:11:12 +02:00
Qubasa
071151f300 clan-lib: Rename parse_deployment_address to parse_ssh_uri 2025-06-23 15:32:35 +02:00
Qubasa
255f2da358 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
Qubasa
054ea67fb7 clan-cli: Simplify HostKeyCheck to a Literal instead of an Enum 2025-06-23 15:08:44 +02:00
Qubasa
65bb9021de clan-cli: Move clan_cli/ssh/host_key.py to clan_lib/ssh 2025-06-23 15:07:18 +02:00
Qubasa
bc6b7e4ae9 clan-lib: Rename check_machine_online to can_ssh_login. Move to Remote object 2025-06-23 14:21:51 +02:00
Qubasa
274c552365 clan-lib: machines.py: Remove host_key attribute 2025-06-19 17:55:56 +02:00
Qubasa
aac07ddd25 clan-lib: machines.py: Remove private_key attribute 2025-06-19 17:28:50 +02:00
Luis Hebendanz
83dd36c784 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
Luis Hebendanz
3c428948be 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
DavHau
020c74de92 vars-check: enable debug logging for cache misses 2025-06-18 14:22:57 +00:00
a-kenji
d67f855d1f 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
Qubasa
a3478d8cc7 clan-lib: Set "root" as default user in Remote object 2025-06-18 12:49:43 +02:00
a-kenji
8e128239d9 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
Jörg Thalheim
097024e8a9 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
Qubasa
d29bba48e7 clan-lib: Make Remote overridable over function arguments 2025-06-17 13:53:43 +02:00
hsjobeki
4e2ccf0117 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
Michael Hoang
7f667ccc16 cli: don't error when more than one SOPS key found locally 2025-06-13 14:37:19 +07:00
Qubasa
c47b2ba869 clan-lib: unify get_taget_host and get_build_host 2025-06-12 16:42:28 +02:00
Qubasa
1a33f6a632 clan-cli: machine.get_inv_machine now uses actions.get_machine in the background 2025-06-12 16:36:55 +02:00
Qubasa
87f4fbfcbf 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
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