Johannes Kirschbauer
048bd37e3b
Inventory: automatically create emtpy file on write
2025-02-10 09:02:23 +00:00
Johannes Kirschbauer
f380046050
CLI: machine create use patch inventory for partial updates
2025-02-10 09:02:23 +00:00
lassulus
7d8c72f9bc
clan_cli flake caching: support outPath
2025-02-10 04:33:37 +00:00
lassulus
2a8f40e91a
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
a-kenji
cf1a4f805c
pkgs/cli: Rename create_file -> persist
2025-02-06 14:59:59 +00:00
lassulus
9195fe4ca2
clan-cli: test_flake_caching: add actual flake caching test
2025-02-05 10:17:37 +00:00
a-kenji
da0f792d9e
vars/interface: Change prompt.persist default to false
...
Change `prompt.persist` default to false.
We want a consistent default that is not conditionally dependent on
other values.
This makes communication on how the functionality is used more
consistent and easier understood.
2025-02-04 07:47:22 +00:00
Louis Opter
48268f7960
clan-cli: do not skip secrets.update_secrets when a group is removed
...
We need to remove all keys that were in the group from affected secrets.
With this change we now take `group_name` as an argument in
`{add,remove}_member`, which is a little bit more readable than
`group_folder.parent.name`, and helps DRY the code a bit.
2025-02-04 03:13:20 +00:00
Louis Opter
36a54ead12
clan-cli: improve tests on clan secrets …
...
When users or groups are updated :
- Check that keys are properly updated on sops secrets;
- Check that no dangling symlinks are left behind in sops secrets.
And when an user is removed from the clan, check that it is removed from
the groups it belonged to.
This doesn't check this works for vars explicitly, since they share the
same logic, see `secret_paths.extend(list_vars_secrets(flake_dir))` in
commit f2856cb773 .
Those improvements allow us to validate that #2659 is indeed fixed, and
tell us that we need to make the same kind of fixes for machines and
groups. For groups this is straightforward, and for machines, when one
is deleted, I wanna discuss first whether we want to delete all its
secrets as well.
2025-02-04 03:13:20 +00:00
a-kenji
94362c1ff5
pkgs/clan: Fix typos
2025-02-02 23:20:39 +07:00
lassulus
18d7167fb3
test_api_dataclass_compat: exlcude flake.py
2025-02-02 11:52:36 +00:00
lassulus
02d450b905
clan-cli: add a Flake class with caching
2025-02-02 11:52:36 +00:00
Qubasa
825b4abd37
clan-cli: Make clan machines create use templating.py
2025-01-31 18:07:48 +07:00
Qubasa
caaafdf5f9
clan-cli: Add test_clan_nix_attrset.py and minor fixups
2025-01-31 16:36:20 +07:00
Qubasa
ed6aaf5f0c
clan: Add autoloaded clanModules from flake inputs. Rename 'directory' to 'self' in buildClan
2025-01-24 12:32:04 +07:00
Johannes Kirschbauer
f0d5cad992
Vars/tests: secrets dont raise backend error depending on the previous backend
2025-01-22 09:02:55 +00:00
Pablo Ovelleiro Corral
038083bece
Migrate borgbackup module to vars
2025-01-16 13:14:24 +01:00
Johannes Kirschbauer
f16f68c77b
Fix: remove password from facts store tests
2025-01-14 17:19:51 +01:00
Johannes Kirschbauer
14261b8a8c
Fix: secret facts store test
2025-01-14 17:19:50 +01:00
Jörg Thalheim
3bcbc8fa3d
reformat after update
2025-01-14 15:30:29 +01:00
DavHau
4a9ae3a45f
vars: rename createFile -> persist
2025-01-11 04:19:46 +00:00
Johannes Kirschbauer
06869a4d27
API/vars: use string based interfaces to get and set vars to avoid state mutations
2025-01-10 12:06:01 +00:00
Johannes Kirschbauer
ecf37e02f8
API/vars: simplify get/set prompts
2025-01-07 11:09:58 +01:00
Johannes Kirschbauer
a42c758ab5
Serde: fix enum type conversion, ensure roundtrip stability
2025-01-03 16:31:25 +01:00
Jörg Thalheim
f2856cb773
updating groups/machines/users keys now also update vars secrets
2024-12-17 19:24:30 +01:00
Jörg Thalheim
e978bfdf9a
vars/tests: merge test_build_scripts_for_correct_system into test_generate_secret_for_multiple_machines
2024-12-17 17:39:27 +01:00
Jörg Thalheim
792aa8033b
merge three prompt type tests into one
2024-12-17 17:39:19 +01:00
Jörg Thalheim
33aa638338
vars: remove duplicate test
2024-12-17 17:21:10 +01:00
Jörg Thalheim
e6addcc879
var: merge migration tests into one
2024-12-17 17:21:10 +01:00
Jörg Thalheim
4f7bd8e485
vars: delete duplicate shared flag test
2024-12-17 17:21:01 +01:00
Jörg Thalheim
047a6722eb
clan_cli: merge four var tests into one
2024-12-17 17:21:01 +01:00
DavHau
b64422679e
vars: commit files for clan vars set
...
fixes #2601
2024-12-17 15:56:08 +07:00
DavHau
1cbba05055
build-clan: fix bug where vars generator scripts are built for target system instead of local system
2024-12-16 19:20:17 +07:00
lassulus
f184128433
cli test_vars: make output check less sensible to nix output
2024-12-14 13:42:31 +01:00
Qubasa
6b784f8623
clan-cli: Rework 'clan ssh' command, improve Tor support.
2024-12-13 00:11:18 +01:00
Jörg Thalheim
9ad4e4d041
fix clan vars for public vars
2024-12-11 16:39:54 +01:00
Jörg Thalheim
91dbafd174
run clang-format
2024-12-11 14:38:36 +00:00
DavHau
a5148ede1d
vars: add test to ensure shared secrets access after --regenerate
...
Ensure that a shared secret can still be accessed by all machines that share it, after a 'clan vars generate --regenerate' has been issued
2024-12-11 15:44:30 +07:00
DavHau
9ae5e27c33
vars: add test for shared secret not being regenerated
...
see https://git.clan.lol/clan/clan-core/issues/2393
2024-12-11 15:14:44 +07:00
Johannes Kirschbauer
959ab140a6
Inventory: init delete patial data
2024-12-10 21:19:04 +01:00
Johannes Kirschbauer
096ddea270
Inventory: fix persistence
2024-12-10 16:41:40 +01:00
lassulus
9129790e5c
vars: move ensure_consistent_state into health_check, move into store classes
2024-12-10 11:54:52 +00:00
Qubasa
65a5789c5b
clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C
2024-12-09 18:07:23 +01:00
Johannes Kirschbauer
69b7f6be5b
inventory.{cli,api}: use only dictionaries
2024-12-06 18:51:20 +01:00
Jörg Thalheim
0a4cf8a8b8
tests/sshd: also log what platform we received in the assert
2024-12-06 15:39:35 +00:00
Johannes Kirschbauer
6dd1ecb044
inventory/api: init smart update for inventory
2024-12-06 11:07:52 +01:00
Johannes Kirschbauer
a032c446e1
inventory/api: prepare list merging
2024-12-06 11:07:52 +01:00
Johannes Kirschbauer
ebd494e112
inventory/eval: init determine writeability for single inventory options
2024-12-05 16:18:46 +01:00
Johannes Kirschbauer
17de9e3e2f
clan.cli.inventory: init partial write
2024-12-04 17:43:20 +01:00
clan-bot
daf892c046
Merge pull request 'Better install instructions for macos' ( #2550 ) from arm64 into main
2024-12-04 16:32:02 +00:00