lassulus
c760561dbd
refactor: remove _serialized field and implement efficient vars selection
...
- Remove _serialized field from vars interface to prevent serialization
errors with throwing passBackend field
- Implement direct selection of generator fields using multi-select syntax
- Refactor vars_generators() to use new Generator.from_flake() method that
selects only safe fields (avoiding non-serializable values)
- Remove unused legacy methods: Generator.from_json(), Var.from_json(),
Prompt.from_json()
- Update precaching to match new selection approach
This fixes the serialization errors that were preventing vars from working
with the new password-store implementation by avoiding the problematic
_serialized field entirely.
2025-07-03 18:53:36 +02:00
Johannes Kirschbauer
12730428bb
test: enable unsafe teardown of tempDir
...
aarch64 libc or kernel might be stricter in keeping files locked while they're open.
This causes failed teardown of the tmpdir
2025-07-02 09:27:05 +02:00
Johannes Kirschbauer
667cee0f6e
buildClan: replace all usages by lib.clan
2025-07-01 11:56:31 +02:00
lassulus
cc923d5638
refactor: replace eval_nix/build_nix with machine.select()
...
- Remove nix(), eval_nix(), and build_nix() methods from Machine class
- Add select() method that handles machine-specific attribute prefixes
- Update all usages to use machine.select() directly
- Handle Path conversion and tmp_store logic at call sites
- This simplifies the Machine API and prepares for deployment.json removal
2025-06-29 17:00:27 +02:00
Qubasa
863aa9029c
Revert "Cleanup templates"
...
This reverts commit 77d8f76eb8 .
2025-06-28 22:42:39 +07:00
Qubasa
2b5f20c4f4
Revert "templates/minimal: consistent input names"
...
This reverts commit 8ab9556a12 .
2025-06-28 22:42:20 +07:00
Qubasa
1be70856d5
Revert "tests/create_clan: bring back read,write checks"
...
This reverts commit f6cad7c4a4 .
2025-06-28 22:42:11 +07:00
Qubasa
9f1482e539
Revert "templates: fix tests"
...
This reverts commit df598275f9 .
2025-06-28 22:41:31 +07:00
Qubasa
ab872711c8
Revert "templates: remove .clan-flake"
...
This reverts commit 14eb541256 .
2025-06-28 22:40:55 +07:00
Mic92
a73f91c162
Merge pull request 'don't keep appending --impure to nix_options when running tests' ( #4128 ) from speed-up-flake-select into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4128
2025-06-28 07:26:16 +00:00
Jörg Thalheim
581dfeffeb
fix unlocked flake.lock in tests
2025-06-28 08:50:41 +02:00
hsjobeki
b88e55364a
Merge pull request 'Update clan templates' ( #4099 ) from update-templates-services into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4099
2025-06-27 17:25:22 +00:00
Johannes Kirschbauer
14eb541256
templates: remove .clan-flake
2025-06-27 19:14:21 +02:00
Johannes Kirschbauer
df598275f9
templates: fix tests
2025-06-27 19:14:21 +02:00
kenji
2467039fe2
Merge pull request 'pkgs/clan: Add machine validator with suggestion logic' ( #4112 ) from ke-machines-update into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4112
2025-06-27 11:09:05 +00:00
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
f6cad7c4a4
tests/create_clan: bring back read,write checks
2025-06-27 11:04:31 +02:00
Johannes Kirschbauer
8ab9556a12
templates/minimal: consistent input names
2025-06-27 11:04:31 +02:00
pinpox
77d8f76eb8
Cleanup templates
2025-06-27 10:39:59 +02:00
a-kenji
aaac5b5b7c
pkgs/clan: Improve error message on clan secrets users add
...
Improve error message on `clan secrets users add [user] --age-key
`AGE-PLUGIN-YUBIKEY`
Since there is no way to get the recipient through the AGE-PLUGIN-YUBIKEY,
we should fail fast and give an actionable error to the user.
2025-06-25 17:30:59 +02:00
a-kenji
7c9600b427
pkgs/clan-cli: Fix typo in sshd test
2025-06-25 10:13:06 +02:00
Qubasa
cd1d49b603
clan-lib: Move nix_options from Machine class to Flake class
2025-06-24 19:03:20 +02:00
kenji
2e403425f9
Merge pull request 'pkgs/clan: Add --tags support to clan machines update' ( #4061 ) from kenji/pkgs/clan: Add --tags support to clan machines update into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4061
2025-06-24 09:43:35 +00:00
a-kenji
fc0e8fa1bd
pkgs/clan: Add --tags support to clan machines update
2025-06-23 23:51:43 +02:00
Qubasa
054ea67fb7
clan-cli: Simplify HostKeyCheck to a Literal instead of an Enum
2025-06-23 15:08:44 +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
Johannes Kirschbauer
92fdba3965
Chore(templates): move helper functions into a util file
2025-06-10 19:38:10 +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
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
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
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
Jörg Thalheim
1cbc1d9af8
test_upload_single_file: add missing ssh_control_master
2025-05-28 20:25:53 +02:00
Jörg Thalheim
1688972bce
move test_ssh_remote to remote_test
2025-05-28 20:13:48 +02:00
Jörg Thalheim
cedc5113ea
add sudo_askpass_proxy
2025-05-28 16:21:30 +02:00
Johannes Kirschbauer
d482e22610
chore(nix_models): migrate import to use exported clan models
2025-05-28 14:03:22 +02:00
Johannes Kirschbauer
dd9ea44770
refactor(persist/utils): rename apply_patch to 'set_value_by_path'
2025-05-28 10:16:48 +02:00
Johannes Kirschbauer
63733f2c14
Fix(test): migrate machine cli command tests to use the new functions
2025-05-27 17:57:08 +02:00
Johannes Kirschbauer
e6d1f71907
Feat(inventory): remove legacy action functions
...
Inventory should only and always be accessed through the inventory store.
Manually reading and writing to the json file is highly insecure
2025-05-27 17:20:04 +02:00
Johannes Kirschbauer
0bf183b73b
fix(tests): use inventory store to interact with the inventory
2025-05-23 21:46:35 +02:00
Qubasa
8b1968cca6
clan-cli: Move Machine object to clan_lib
2025-05-22 19:11:19 +02:00
Qubasa
e14f30bdc0
clan-cli: Rename Host -> Remote move to clan_lib and mark as frozen
2025-05-22 14:08:27 +02:00
DavHau
d833b62614
GUI: add credentials page (vars)
...
add it to machine details
2025-05-21 11:47:04 +00:00
lassulus
2de3dcef15
clan-cli: clan_cli.inventory -> clan_lib.inventory
2025-05-21 12:06:38 +02:00
Johannes Kirschbauer
70d06a189b
Refactor(clan_lib): move serde tests next to serde module
2025-05-21 09:36:00 +02:00
hsjobeki
3edd6487cc
Merge pull request 'feat(docs,api): expose inventory.instances interface' ( #3721 ) from hsjobeki/clan-core:inventory-services-1 into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3721
2025-05-20 15:29:14 +00:00
lassulus
03990ef7f0
clan-cli: clan_cli.templates -> clan_lib.templates
2025-05-20 16:08:02 +02:00
Johannes Kirschbauer
7a0665da6d
Feat(jsonschema): convert deferredModule to unknown
2025-05-20 15:48:28 +02:00
lassulus
1f0c355175
clan-cli: clan_cli.custom_logger -> clan_lib.custom_logger
2025-05-20 15:08:02 +02:00
lassulus
a4895a4d96
clan-cli: clan_cli.async_run -> clan_lib.async_run
2025-05-20 15:05:11 +02:00