DavHau
9ffc3da52b
vars/tests: fix nix eval triggering git concurrent access
...
Prevents this error: Another git process seems to be running in this repository
2024-09-16 18:58:22 +02:00
Qubasa
0f0a8825e1
clan-cli: Init clan machines import
2024-09-16 18:15:55 +02:00
Johannes Kirschbauer
b4e3dff23b
CLI: api.register type preservation
2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
91a9fb23be
API: rename set_inventory
2024-09-13 16:11:10 +02:00
DavHau
a1dd10f502
vars/sops/shared: add machines key on demand
2024-09-12 20:17:05 +02:00
clan-bot
2fc5572ff7
Merge pull request 'API: remove all python dataclasses for clanModules (services)' ( #2080 ) from hsjobeki/clan-core:hsjobeki-main into main
2024-09-12 16:37:51 +00:00
DavHau
067d287398
vars/list: display '<not set>' also for secrets
2024-09-12 17:24:29 +02:00
Johannes Kirschbauer
f2a2b8e893
API: type all services with dict[str,Any] in python to reduce complexity.
2024-09-12 16:19:51 +02:00
a-kenji
4d2ad709ad
vars: use correct paths for value accesses
...
Use correct paths for value accesses of vars under:
- `per-machine`
- `shared`
2024-09-11 19:02:43 +02:00
DavHau
6fafafa064
vars/password-store: use standard paths; fix share flag
2024-09-09 21:20:03 +02:00
DavHau
b3dd36bdb6
vars: improve generator pipeline
...
Compute the whole closure of to-be-executed generators upfront before executing anything
Properly compute closures for the 4 different scenarios:
1. full_closure: run all generators for a selected machine in topological order
2. all_missing_closure: run just the missing generators including their dependents
3. requested_closure: run only a selected list of generators including their missing dependencies and their dependents
4. minimal_closure: Run just enough to ensure that the list of selected generators are in a consistent state. Don't execute anything if nothing is missing.
2024-09-06 21:32:17 +02:00
Qubasa
2b5cdd66f9
clan-cli: Make run_vm_in_thread fail fast. Fix generate_flake to support machine_id
2024-09-06 18:53:02 +02:00
Qubasa
b16a53f510
clanCore: init machine_id.nix with clan.core.machine.{id,diskId}
2024-09-06 18:05:40 +02:00
DavHau
f161c7ca58
vars: improve generator execution pipeline
...
- ensure all dependents are re-generated as well
- refactor: separate out computation of generator update closure
2024-09-06 14:30:49 +02:00
DavHau
1254b80a52
vars: add api endpoint set_prompts
2024-09-04 18:06:11 +02:00
DavHau
112982a7fb
vars: add get_prompts api endpoint
...
vars: add test for api endpoint get_prompts
2024-09-04 17:36:50 +02:00
DavHau
bd554ca392
vars: new option prompts.<name>.createFile
2024-09-04 15:48:10 +02:00
Jörg Thalheim
f18771364c
get rid of ValueError
2024-09-03 18:14:31 +02:00
Jörg Thalheim
403b9cf2cc
apply TRY lint
2024-09-03 18:13:46 +02:00
Johannes Kirschbauer
5defa9d49d
serde/fix: round trip string sanitizing
2024-09-03 18:03:13 +02:00
Jörg Thalheim
659e5b37dd
use pathlib everywhere
2024-09-02 18:26:13 +02:00
Jörg Thalheim
357b619068
add SIM lint
2024-09-02 16:39:30 +02:00
Jörg Thalheim
ad3daa3ce4
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Jörg Thalheim
ddab0a66c8
add PT
2024-09-02 15:52:17 +02:00
Jörg Thalheim
078cab47bf
add FA, ICN, ISC, LOG, PIE and PYI linting
2024-09-02 15:41:56 +02:00
Jörg Thalheim
15ff74f7c2
enable ASYNC, DTZ, YTT and EM lints
2024-09-02 14:07:06 +02:00
Jörg Thalheim
e9a266001c
enable comprehensions linting rules
2024-09-02 13:35:52 +02:00
Jörg Thalheim
35839ef701
enable bug-bear linting rules
2024-09-02 13:26:07 +02:00
Jörg Thalheim
f3a2b4d80e
fix all typing error in tests
2024-09-02 12:23:13 +02:00
DavHau
2ec3abb24c
vars: improve check command and add tests
2024-09-01 16:45:09 +02:00
DavHau
8ad90aa44f
vars: fix listing vars + add test
2024-09-01 16:10:25 +02:00
DavHau
6f4827bde4
vars: implement listing all vars
2024-09-01 16:03:37 +02:00
DavHau
ec055f7606
vars: introduce deploy=true/false for generated files
2024-09-01 14:32:46 +02:00
Jörg Thalheim
1585afc8b3
fix users in VM again
2024-08-24 19:19:24 +02:00
DavHau
b49c517ad6
vars: add deploy test for shared generators
2024-08-23 17:36:33 +02:00
DavHau
1a27bfa8a8
Reapply + Fix "vars: fix - upload machines own secrets only"
...
This reverts commit 0cd29daf88 .
2024-08-23 15:42:46 +02:00
clan-bot
0d7bb8f910
Merge pull request 'Clan-app: install machine' ( #1954 ) from hsjobeki/clan-core:hsjobeki-main into main
2024-08-22 08:21:10 +00:00
Johannes Kirschbauer
f7e64cc3b5
API: serde fix nullable fields should be allowed to be none
2024-08-21 17:53:25 +02:00
Qubasa
6c4d7494f6
clan-cli: Fix some type errors in tests
2024-08-21 15:48:43 +02:00
Qubasa
1cb26b41e7
clan-vm-manager: Fix regression
2024-08-21 15:48:43 +02:00
Mic92
cf3a1d6b7a
Merge branch 'main' into rework-installation
2024-08-21 13:28:29 +00:00
Jörg Thalheim
d20287f9e3
capture_output: only start capturing when we enter the with statement
2024-08-21 15:16:46 +02:00
DavHau
0cd29daf88
Revert "vars: fix - upload machines own secrets only"
...
This reverts commit 2a8958f494 .
2024-08-21 14:59:05 +02:00
DavHau
2a8958f494
vars: fix - upload machines own secrets only
2024-08-21 14:47:41 +02:00
Jörg Thalheim
2fbd0b6796
test_create_flake: use template name instead of url
2024-08-21 13:59:38 +02:00
Qubasa
b2530f0b19
clan-app: Fix nix run .#clan-app
2024-08-21 13:52:25 +02:00
Aos Dabbagh
7281cef29e
fix(installer): Fix language check case
...
When attempting to follow the docs on the installer, this error comes
up:
```
$ clan flash --flake git+https://git.clan.lol/clan/clan-core \
--ssh-pubkey ~/.ssh/id_ed25519.pub \
--keymap us \
--language en_US.utf-8 \
--dry-run flash-installer
ERROR: Language 'en_US.utf-8' is not a valid language. Run 'clan flash --list-languages' to see a list of possible languages.
```
I only decided to clean up the docs, but I'm also okay with just
downcasing the locales in `list_possible_languages()`.
2024-08-21 08:15:49 +00:00
Jörg Thalheim
cd5313d7ce
fix remaining places not using captured_output
2024-08-15 19:57:08 +02:00
Jörg Thalheim
82d3b98a38
use capture in more places
2024-08-15 19:20:01 +02:00
Jörg Thalheim
fe66a740b5
add fixture to capture output in tests less fragile
...
Now we always remove previous output before capturing.
2024-08-15 18:45:03 +02:00