kenji
191485fe8b
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
020c74de92
vars-check: enable debug logging for cache misses
2025-06-18 14:22:57 +00:00
a-kenji
1f692c91e4
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
Luis Hebendanz
30ffef515e
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
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
Michael Hoang
a0f39a4a66
cli: fix machines update failing with protocol mismatch on macOS
2025-06-18 16:30:11 +07: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
Jörg Thalheim
a2eaf20492
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 e14f30bdc0 .
2025-06-17 16:30:04 +02:00
Qubasa
86536bae42
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
Qubasa
d29bba48e7
clan-lib: Make Remote overridable over function arguments
2025-06-17 13:53:43 +02:00
Jörg Thalheim
28a0f09514
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
dd3662b81e
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
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
Johannes Kirschbauer
99e5d7e671
Docs(cli/flash): improve disk instructions
2025-06-13 11:37:39 +02:00
Michael Hoang
7f667ccc16
cli: don't error when more than one SOPS key found locally
2025-06-13 14:37:19 +07:00
Michael Hoang
5dc321cfb0
cli: fix secrets key update failing when used with Nix in Nix
2025-06-13 13:36:29 +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
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
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
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