Qubasa
2934269279
clan-lib: Make Flake throw more concrete errors if the flake path is invalid or non existend
...
treefmt
2025-08-21 23:53:26 +02:00
Luis Hebendanz
aa840d9758
Merge pull request 'working check_machine_up_to_date' ( #4754 ) from Qubasa/clan-core:build_is_installed_api into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4754
2025-08-20 19:12:53 +00:00
hsjobeki
d1e6da0779
Merge pull request 'api/install: set install date after install' ( #4838 ) from install-done into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4838
Reviewed-by: brianmcgee <brian@bmcgee.ie >
2025-08-20 19:02:13 +00:00
Johannes Kirschbauer
e6981ddd72
cli/install: add --no-persist-state
...
Skip persisting the current date after successful install
This is a workaround due to incomplete test setup - installing a clan machine without having a clan
2025-08-20 20:46:44 +02:00
Qubasa
101c52f7c2
clan_lib: Add 'address' field to LocalHost
2025-08-20 20:28:21 +02:00
Qubasa
ea1e470502
clan_lib: add 'get_metrics' API endpoint
2025-08-20 20:17:14 +02:00
Mic92
5a5ec468c7
Merge pull request 'clan-cli: use automatic networking for vars upload and machines update' ( #4792 ) from networking_4 into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4792
2025-08-20 12:42:56 +00:00
lassulus
e2eb26345f
networking: add documentation, unhide from CLI
2025-08-20 14:22:58 +02:00
Johannes Kirschbauer
05951ffdb9
api/install: set install date after install
2025-08-20 13:39:32 +02:00
DavHau
527b4b2e40
vars: ensure shared generators don't depend on machine specific generators
...
A dependency relation like this would not make sense as it would not be clear which machines generator the shared generator would depend on
2025-08-20 15:39:17 +07:00
DavHau
de0b1b2d70
vars: fix regenerating a specific generator
...
This was broken after re-designing the API -> added a test
2025-08-20 14:49:27 +07:00
DavHau
ef2a2bdb67
vars: improve tests for --regenerate
...
Ensures that all generators values actually change after running with --regenerate
2025-08-20 11:59:18 +07:00
DavHau
7b61a668e9
vars: refactor: use Machine objects instead of base_dir strings
...
Replace base_dir string parameters with Machine objects throughout the vars
module for better type safety and consistency.
2025-08-20 11:59:18 +07:00
lassulus
448c22c280
clan-cli: use automatic networking for vars upload and machines update
...
This uses the networking module to find the best_host, as we already do
with ssh and install. So if we don't supply a --target-host and a
networking module is configured, the remote should be autodetected.
Since vars upload doesn't have a --target-host argument, we always try
to use get_best_remote
2025-08-19 23:40:57 +02:00
Mic92
26b31e24a3
Merge pull request 'Make most vm tests pure.' ( #4796 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4796
2025-08-19 16:10:08 +00:00
Jörg Thalheim
899dba5a08
tests/vms: add chroot-realpath (needed on aarch64)
2025-08-19 15:53:46 +00:00
Brian McGee
d2b94ced5a
feat(api): define list machine options as data class
2025-08-19 16:51:30 +01:00
Jörg Thalheim
cdf9fa1753
move vm configuration into a stand-alone module and include it in our test vms
...
This hasn't reduced the extra deps we have to pass to our nixos build
unfortunally, but maybe at least it can safe us a few in the future.
2025-08-19 15:45:57 +00:00
Brian McGee
9aebf02f05
feat(ui): display machine install state and install button
2025-08-19 15:09:34 +01:00
Jörg Thalheim
ffb7b91da7
drop impure checks from ci
2025-08-19 15:28:25 +02:00
Jörg Thalheim
2d264a8e5e
mark vm tests as pure
2025-08-19 15:28:25 +02:00
Jörg Thalheim
699c56c721
qemu: enable usb tablet option only on x86_64-linux
...
at least on aarch64-linux this locks up the hypervisor
2025-08-19 15:16:56 +02:00
Jörg Thalheim
2ce5388a75
qemu: fix machine types for various platforms
2025-08-19 15:16:56 +02:00
Jörg Thalheim
5b1a9d6848
vms: also prebuild for aarch64
2025-08-19 14:49:52 +02:00
Jörg Thalheim
1850abdd0d
clan-cli/vms/run: generate secret before inspect_vm
...
inspect_vm does some caching, which lead to secrets not beeing found.
2025-08-19 14:49:52 +02:00
Jörg Thalheim
ed503f64da
vms/run: move python import to the top.
2025-08-19 14:49:52 +02:00
Jörg Thalheim
4074a184b2
make vm test pure
2025-08-19 14:47:12 +02:00
Jörg Thalheim
6fe2b06f09
qemu: fix nix chroot store support
2025-08-19 14:47:12 +02:00
Jörg Thalheim
8fe7cb1b3d
virtiofsd: fix nix chroot store support
2025-08-19 14:47:12 +02:00
DavHau
815c6c9438
vars: move generation functions to clan_lib
2025-08-19 18:05:53 +07:00
DavHau
9ce563aa08
vars: log var updates under specific machine
...
This makes it easier in the logs to identify which machine a var update belongs to
2025-08-19 11:03:36 +00:00
DavHau
ab274ce932
vars: refactor - remove generate_vars() in favor of run_generators()
...
The motivation is to have one shared entry point for the CLI as well as API/GUI
2025-08-19 16:26:53 +07:00
DavHau
aadc8a1d63
vars: refactor - remove _generate_vars_for_machine function
...
This became unnecessary by now
2025-08-19 07:41:31 +00:00
DavHau
aaca8f4763
vars: refactor - move generator specific code to Generator class
...
Several functions in generate.py were specific to generator instances. Let's move them into the Generator class
2025-08-19 07:41:31 +00:00
DavHau
ee87f20471
vars: refactor - remove create_machine_vars_interactive in favor of run_generators
...
The motivation is to create one powerful entrypoint shared by the GUI as well as the CLI in order to not having to maintain too much separate code paths.
As a next step, generate_vars can probably also be removed.
2025-08-19 13:26:38 +07:00
Johannes Kirschbauer
f82d18d649
API: rename util file to 'type_to_jsonschema'
2025-08-18 19:30:43 +02:00
Johannes Kirschbauer
287a303484
API/schema: make type conversion more strict in terms of undefined fields
2025-08-18 19:29:54 +02:00
Johannes Kirschbauer
1213608f30
API: init support for narrowing union types
...
This allows to relax constraints on functions using overloaded interfaces
I.e. for unifying logic this allows passing 'callable | dict'
Conretely useful for prompt values that are asked on demand in the cli, vs upfront in the ui
2025-08-18 19:28:47 +02:00
hsjobeki
e109361e81
Merge pull request 'clanModules: remove unused code' ( #4785 ) from clean-dead-code into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4785
2025-08-16 11:03:16 +00:00
Johannes Kirschbauer
03968d8fbc
api/inventory: remove leaked schemas
2025-08-16 12:56:30 +02:00
Johannes Kirschbauer
2f27b3941e
lib/inventory: limit access to defined keys
2025-08-16 12:56:30 +02:00
Johannes Kirschbauer
9fe457ebd5
lib/clanModules: update nix_models
2025-08-16 11:59:16 +02:00
Johannes Kirschbauer
4a51aa9316
clanModules: remove unused test code
2025-08-16 11:58:55 +02:00
Mic92
ed78e49c47
Merge pull request 'vms/inspect: mark test as pure' ( #4781 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4781
2025-08-15 11:54:46 +00:00
Jörg Thalheim
3ef0a7919d
vms/inspect: mark test as pure
2025-08-15 13:31:27 +02:00
Jörg Thalheim
36812d5f95
test_vars_deployment: simplify test to just start one vm
2025-08-15 13:30:30 +02:00
Mic92
f5bcdb4ba0
Merge pull request 'flakes/inspect: mark test as pure' ( #4779 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4779
2025-08-15 11:28:22 +00:00
Jörg Thalheim
b69ad0eca5
backups/list: mark as pure
2025-08-15 13:10:41 +02:00
Jörg Thalheim
b221c29694
flakes/inspect: mark test as pure
2025-08-15 13:08:30 +02:00
Mic92
ec3d224e1d
Merge pull request 'tests_secrets_generate: mark as pure' ( #4766 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4766
2025-08-15 11:06:47 +00:00