DavHau
81cb28b6c0
vars/sops/shared: add machines key on demand
2024-09-12 20:17:05 +02:00
clan-bot
65a1a1a3b8
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
eafcb0f870
vars/list: display '<not set>' also for secrets
2024-09-12 17:24:29 +02:00
Johannes Kirschbauer
e3d85fc2b8
API: type all services with dict[str,Any] in python to reduce complexity.
2024-09-12 16:19:51 +02:00
a-kenji
6dd1a7395f
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
0893b04458
vars/password-store: use standard paths; fix share flag
2024-09-09 21:20:03 +02:00
DavHau
803f43dfd1
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
2568002611
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
4171d5ea4e
clanCore: init machine_id.nix with clan.core.machine.{id,diskId}
2024-09-06 18:05:40 +02:00
DavHau
5cd9960ed4
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
a57525d5c6
vars: add api endpoint set_prompts
2024-09-04 18:06:11 +02:00
DavHau
ed1738c0cd
vars: add get_prompts api endpoint
...
vars: add test for api endpoint get_prompts
2024-09-04 17:36:50 +02:00
DavHau
dc4fcb7329
vars: new option prompts.<name>.createFile
2024-09-04 15:48:10 +02:00
Jörg Thalheim
5ac3ac63c2
get rid of ValueError
2024-09-03 18:14:31 +02:00
Jörg Thalheim
29909e49d3
apply TRY lint
2024-09-03 18:13:46 +02:00
Johannes Kirschbauer
caad48682d
serde/fix: round trip string sanitizing
2024-09-03 18:03:13 +02:00
Jörg Thalheim
1fa0e72bea
use pathlib everywhere
2024-09-02 18:26:13 +02:00
Jörg Thalheim
483d8ce521
add SIM lint
2024-09-02 16:39:30 +02:00
Jörg Thalheim
cb16cda3fa
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Jörg Thalheim
dca1bd084d
add PT
2024-09-02 15:52:17 +02:00
Jörg Thalheim
8fbc76ecac
add FA, ICN, ISC, LOG, PIE and PYI linting
2024-09-02 15:41:56 +02:00
Jörg Thalheim
e150b37fb8
enable ASYNC, DTZ, YTT and EM lints
2024-09-02 14:07:06 +02:00
Jörg Thalheim
22d6e5e153
enable comprehensions linting rules
2024-09-02 13:35:52 +02:00
Jörg Thalheim
109d1faf9e
enable bug-bear linting rules
2024-09-02 13:26:07 +02:00
Jörg Thalheim
b24cbb18b7
fix all typing error in tests
2024-09-02 12:23:13 +02:00
DavHau
64d29cd28c
vars: improve check command and add tests
2024-09-01 16:45:09 +02:00
DavHau
b627eafc80
vars: fix listing vars + add test
2024-09-01 16:10:25 +02:00
DavHau
04010bba90
vars: implement listing all vars
2024-09-01 16:03:37 +02:00
DavHau
62ccd0ed4b
vars: introduce deploy=true/false for generated files
2024-09-01 14:32:46 +02:00
Jörg Thalheim
969eb2f16e
fix users in VM again
2024-08-24 19:19:24 +02:00
DavHau
238fae500d
vars: add deploy test for shared generators
2024-08-23 17:36:33 +02:00
DavHau
f0a3eaca96
Reapply + Fix "vars: fix - upload machines own secrets only"
...
This reverts commit cb860f9a03 .
2024-08-23 15:42:46 +02:00
clan-bot
68c25d6aeb
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
b7d0314826
API: serde fix nullable fields should be allowed to be none
2024-08-21 17:53:25 +02:00
Qubasa
19fe0432d9
clan-cli: Fix some type errors in tests
2024-08-21 15:48:43 +02:00
Qubasa
f74df54edd
clan-vm-manager: Fix regression
2024-08-21 15:48:43 +02:00
Mic92
3710175785
Merge branch 'main' into rework-installation
2024-08-21 13:28:29 +00:00
Jörg Thalheim
a72498fe2c
capture_output: only start capturing when we enter the with statement
2024-08-21 15:16:46 +02:00
DavHau
cb860f9a03
Revert "vars: fix - upload machines own secrets only"
...
This reverts commit 8d61b03f8d .
2024-08-21 14:59:05 +02:00
DavHau
8d61b03f8d
vars: fix - upload machines own secrets only
2024-08-21 14:47:41 +02:00
Jörg Thalheim
6c421be9b2
test_create_flake: use template name instead of url
2024-08-21 13:59:38 +02:00
Qubasa
e6dafd05f9
clan-app: Fix nix run .#clan-app
2024-08-21 13:52:25 +02:00
Aos Dabbagh
1e96f59ecd
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
609b208d91
fix remaining places not using captured_output
2024-08-15 19:57:08 +02:00
Jörg Thalheim
223b97d665
use capture in more places
2024-08-15 19:20:01 +02:00
Jörg Thalheim
e51905545d
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
Jörg Thalheim
6d764b35f7
test_history_cli: clear capsys before reading from program
2024-08-15 17:59:11 +02:00
Jörg Thalheim
bc1c7c748f
try to log content of flake substitutes
2024-08-15 17:43:57 +02:00
Johannes Kirschbauer
cacd49ff54
Serde: extend deserializer to accept anything
2024-08-15 15:08:15 +02:00
Jörg Thalheim
dc229a1b3b
fixtures_flake: avoid fileinput
...
it seems that the inplace argument in some cases picks up output from
unrelated functions. Since the file is relativly small, we can just
replace the content in one go.
2024-08-14 16:56:44 +02:00