Jörg Thalheim
1d0e0f243e
PLW2901: fix
2025-08-25 15:17:06 +02:00
Mic92
8134ffd787
Merge pull request 'ruff-4-perf-fixes' ( #4935 ) from ruff-4-perf-fixes into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4935
2025-08-25 13:12:14 +00:00
Jörg Thalheim
7f1590c729
PERF403: fix
2025-08-25 15:06:32 +02:00
Jörg Thalheim
c65bb0b1ce
PERF401: fix
2025-08-25 15:06:32 +02:00
Jörg Thalheim
d9e6e0c540
D417: fix
2025-08-25 14:56:48 +02:00
Jörg Thalheim
ef5ab0c2f4
D404: fix
2025-08-25 14:56:48 +02:00
Mic92
05665b1c7e
Merge pull request 'ruff-3-arg-fixes' ( #4934 ) from ruff-3-arg-fixes into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4934
2025-08-25 12:54:04 +00:00
Jörg Thalheim
04457b1272
ARG001: fix
2025-08-25 14:46:12 +02:00
Jörg Thalheim
4986fe30c3
ARG002/ARG005: fix
2025-08-25 14:36:36 +02:00
Jörg Thalheim
6a2dfb8176
S101: fix
2025-08-25 14:11:25 +02:00
Jörg Thalheim
332d10e306
s110: address
2025-08-25 14:07:59 +02:00
Jörg Thalheim
e208c02be7
S311: fix random usage
2025-08-25 14:07:59 +02:00
Jörg Thalheim
7747e3cc0d
S604: ignore
2025-08-25 14:07:59 +02:00
Jörg Thalheim
1c24b4c6cb
S604: fix
2025-08-25 14:07:59 +02:00
Jörg Thalheim
0a70ed6268
S108: ignore our uses
2025-08-25 13:43:33 +02:00
Jörg Thalheim
dc5485d9f1
ruff: replace asserts outside of tests with Exceptions
2025-08-25 13:06:04 +02:00
DavHau
c308fd63a7
vars: delete old var when changing share
...
When changing a password from non-shared to shared, we want to remove the old one
2025-08-25 10:37:46 +00:00
Mic92
0803d9c864
Merge pull request 'Apply automatic ruff lints' ( #4919 ) from ruff-1 into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4919
2025-08-25 09:53:41 +00:00
Jörg Thalheim
0ec2c32ff8
ruff: apply automatic unsafe fixes
2025-08-25 11:34:41 +02:00
Jörg Thalheim
ea2d6aab65
ruff: apply automatic fixes
2025-08-25 11:34:41 +02:00
Johannes Kirschbauer
00bd003be4
tests/dirs: unify test files
2025-08-25 10:14:02 +02:00
hsjobeki
9a0ad4182f
Merge pull request 'api/modules: unify frontmatter with module manifest' ( #4847 ) from api-modules-unify into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4847
Reviewed-by: lassulus <clanlol@lassul.us >
2025-08-21 12:56:19 +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
Johannes Kirschbauer
f4d6edc501
api/modules: unify frontmatter with module manifest
2025-08-20 20:15:41 +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
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
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
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