Commit Graph

16 Commits

Author SHA1 Message Date
DavHau
cf0953146d api/machines: allow importing extra modules
- add top-level option `clanImports` to clanCore
- clanImports can be set and checked as any other option
- buildClan resolves the clanImports from the settings.json before calling evalModules to prevent infinite recursions
- new endpoint PUT machines/{name}/schema to allow getting the schema for a specific list of imports
- to retrieve the currently imported modules, cimply do a GET or PU on machines/{name}/config which will return `clanImports` as part of the config

Still missing: get list of available modules
2023-10-25 16:36:30 +01:00
DavHau
177be69eda PUT api/machines/{name}/config: ensure only valid config is ever written
- add CLAN_MACHINE_SETTINGS_FILE variable to temporarily override the machine settings file
- do a dry-run evaluation first with the new config before persisting it.
2023-10-24 18:40:48 +01:00
DavHau
f1e7495806 machines: add endpoint machines/{name}/ verify 2023-10-24 16:31:37 +01:00
Jörg Thalheim
ded120d065 drop requirement for importing qemu-vm.nix 2023-09-27 14:54:01 +02:00
Jörg Thalheim
e3b2424d9d make git optional again 2023-09-22 16:07:39 +02:00
DavHau
6a359c0a2f clan-cli: add git.commit_file() to auto commit files if inside a git
- commit only if inside a git repo
- commit only the specified file and nothing else
- auto-generate commit message if not specified
2023-09-21 14:07:54 +02:00
DavHau
c11f73c4d0 clan config: fix settings file location 2023-09-19 15:12:29 +02:00
Jörg Thalheim
9b7b6996d6 nix_eval: add --json by default 2023-09-15 13:50:31 +02:00
Jörg Thalheim
3bdd3af248 cli: fix nixpkgs unfree import 2023-09-06 17:37:41 +02:00
DavHau
a1d825d0a0 clan-config: fix: read options from nixosConfigurations instead of nixosModules 2023-09-02 16:35:59 +02:00
DavHau
8ca0a2aee4 clan-config: introduce --machine + add tests 2023-08-30 20:59:26 +02:00
DavHau
b55ceec40c clan-config: use pinned nixpkgs + fix test flake 2023-08-26 23:33:32 +02:00
DavHau
8c7ee25dc9 webui: fixes for machines endpoint
- fix machines settings file location
- raise 404 if machine doesn't exist
- improve machine api test
2023-08-26 14:17:25 +02:00
DavHau
518bf4197f webui: tests for machine config endpoints 2023-08-26 08:46:53 +02:00
DavHau
868c49acea webui: implement /api/machines/{name}/config 2023-08-25 23:18:34 +02:00
DavHau
fb76ad45e8 webui: implement /api/machines/{name}/schema 2023-08-25 21:26:30 +02:00