Commit Graph

609 Commits

Author SHA1 Message Date
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
Johannes Kirschbauer
3f46d37b67 Clan-app: generate hw spec via ssh 2024-08-14 16:28:43 +02:00
Johannes Kirschbauer
8d1a1ddb17 Serializer: filter None fields, to avoid conflicts with nix module system 2024-08-13 19:27:59 +02:00
DavHau
6892202bf2 vars: add test for deployment 2024-08-13 15:29:51 +02:00
DavHau
a4847915de clan-cli/vms: add option --publish to forward ports from host to guest 2024-08-04 15:28:51 +07:00
DavHau
629861d404 tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
DavHau
0ca3d036f2 vars: simplify tests 2024-08-03 15:47:35 +07:00
DavHau
e22ec9ea5a clan-cli/tests: improve test helpers for VMs 2024-08-03 15:26:53 +07:00
DavHau
d1c2f0b622 vars: introduce share flag 2024-08-03 15:26:53 +07:00
Qubasa
fb4ceebccf formatter.nix: Add prettier 2024-08-02 18:56:53 +02:00
Qubasa
3e9ebbc90f clan-app: Finish flash view. clan-cli: Flash cli now verifies if language and keymap are valid. 2024-08-02 17:51:45 +02:00
a-kenji
0a58adce18 clan: remove config subcommand
This removes the `config` subcommand from the cli and the documentation
to keep the api surface small.

While this functionality was convenient it doesn't need to be surfaced
by the clan cli.

The remaining `config` python module should be ported to the `clan-app`
in a follow up pr. Because the functionality is currently only used by
the `clan-app`.
Ideally together with: #1830.
2024-07-31 16:35:36 +00:00
Johannes Kirschbauer
8ddfaba599 Deserializer: add Literal; Annotated fields 2024-07-31 13:00:28 +02:00
Johannes Kirschbauer
9db6cb8b6f Deserializer: add Nullable fields 2024-07-30 14:26:13 +02:00
Johannes Kirschbauer
5d8fa57f23 Deserializer: replace pydantic 2024-07-30 12:26:16 +02:00
Qubasa
ce1dec774e clan-vm-manager: Fix regression 2024-07-29 17:33:46 +02:00
Johannes Kirschbauer
4be5ed28db Clan-app: example disk view 2024-07-29 11:49:55 +02:00
Johannes Kirschbauer
395a7fc70e Serializer: use alias, make it configurable for different use cases 2024-07-29 09:01:06 +02:00
Johannes Kirschbauer
d7b6fc16a4 Serde: add unit tests for all serialization and deserialization logic 2024-07-26 14:23:41 +02:00
DavHau
1b3dc65b89 vars/sops: store secrets in /sops/vars 2024-07-24 18:42:50 +07:00
clan-bot
49ace8a765 Merge pull request 'Inventory improvements' (#1795) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-24 11:23:16 +00:00
Johannes Kirschbauer
1b52dca96b Fix unit tests 2024-07-24 13:15:08 +02:00
DavHau
2bc716377d tests/generate_flake: support inventory argument 2024-07-24 17:06:42 +07:00
Johannes Kirschbauer
871fa8f1ff Inventory: add load_eval method 2024-07-24 10:34:10 +02:00
DavHau
5105ff14e0 vars: add support for password-store 2024-07-23 14:54:18 +07:00
DavHau
0acf9178c8 vars: implement prompts 2024-07-22 20:40:12 +07:00