Commit Graph

223 Commits

Author SHA1 Message Date
Johannes Kirschbauer
b74590f381 Inventory: simplify build-clan interface 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
2f8b782a1f Inventory: init module merge & validation logic for inventory 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
c89080deb4 Extend build-clan interface 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
d7dc66da03 Json-schema tests: add schema specifier to test 2024-06-24 16:00:46 +02:00
Johannes Kirschbauer
51154c1d54 schema improvements: add additionalProperties: false to ensure closed types 2024-06-24 15:55:48 +02:00
Johannes Kirschbauer
13c3169b41 lib: eval clan module as lib function 2024-06-24 15:47:25 +02:00
Johannes Kirschbauer
294c5548b9 Inventory: add concrete use-case examples 2024-06-24 14:35:41 +02:00
DavHau
313db5643f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
Johannes Kirschbauer
83fe58e003 clan-core: add clan meta for ui usage 2024-05-31 16:26:46 +00:00
DavHau
54fcfda43e lib.jsonschema: parse some more types 2024-05-23 16:12:49 +02:00
Qubasa
fc7f544199 Fix invalid jsonschema testcase 2024-05-04 14:11:28 +02:00
Qubasa
393ed517e2 jsonschema: Filter out 'invisible' options, that are there to throw errors on define 2024-05-03 19:40:42 +02:00
Qubasa
159198b81a Add jsonschema test case 2024-05-03 19:40:42 +02:00
Qubasa
6908527ebd Throw error on missing clanModule description or if description too long. Add xfce description. 2024-05-02 17:53:27 +02:00
Qubasa
570f04ecdc Fix zt-tcp-relay 2024-05-02 16:59:17 +02:00
Qubasa
3a9a7eedf9 Remove unreferenced clan modules 2024-05-02 16:34:25 +02:00
Qubasa
ee552d3020 Move vm clanModules to lib 2024-05-02 16:34:25 +02:00
Qubasa
a09e680fa0 Require README.md for every clan module 2024-05-02 16:34:25 +02:00
Qubasa
a48df5b993 Add package function-schema and module-schema. Add check for module jsonschema. 2024-05-01 23:16:17 +02:00
Jörg Thalheim
1ac982fbdb set networking.hostName to clanCore.machineName 2024-04-09 15:10:08 +02:00
DavHau
6f9216d3b6 buildClan: add clan-core to specialArgs 2024-04-02 16:03:45 +07:00
Jörg Thalheim
e296a3019d re-format with nixfmt 2024-03-17 19:48:49 +01:00
Jörg Thalheim
1356ca9b8c fix cross-system deploy
This allows to be nixpkgs.pkgs and deploy systems of a different arch.
2024-02-21 10:55:53 +01:00
lassulus
6871b29d15 vms: use vm fact/secret-store 2024-02-15 10:41:25 +01:00
lassulus
eebd9d0b4a allow passing of extra_config into machines 2024-02-11 08:40:41 +01:00
Jörg Thalheim
614d1aecfd set nixpkgs.pkgs for secrets generation
This allows us to use the same nixpkgs instance for all machines.
2024-02-06 17:21:42 +01:00
Qubasa
21443d0647 cli,nix: Add machine_icon, machine_description 2024-02-06 19:25:34 +07:00
Qubasa
4421797f30 build-clan: Removed unecessary arg, machineDescription and machineIcon 2024-02-05 16:56:13 +07:00
Qubasa
b3815527a5 Added machineIcon and machineDescription to buildClan 2024-02-05 14:18:40 +07:00
Jörg Thalheim
4a3abf5fe9 build-clan: force system override in secrets generators 2024-01-17 14:40:46 +00:00
Jörg Thalheim
fb151b227d build-clan: don't set system with lib.mkForce 2024-01-17 15:25:29 +01:00
Jörg Thalheim
0bdf55b09f use nix-unit from nixpkgs 2023-12-15 12:36:07 +01:00
Qubasa
eba34bf2f7 Changed clanIcon to be included into clanCore 2023-12-08 19:08:57 +01:00
Qubasa
31d95e64f8 Added clanIcon 2023-12-08 19:01:11 +01:00
Jörg Thalheim
4aa60317fa move clanName into nixos machine configuration 2023-12-08 15:05:56 +00:00
DavHau
f54ad0f739 jsonschema: support mdDoc description 2023-11-21 17:29:22 +07:00
DavHau
3c4c2995ca lib/jsonschema: add more types and excludes
- Complete the types to cover almost everything
- exclude specific types like functionTo or package
2023-11-20 19:40:27 +07:00
DavHau
e779bc2d11 lib/jsonschema: support listOf unspecified 2023-11-20 17:03:42 +07:00
Jörg Thalheim
7f6b0dfaea pin nixos-wide registry to nixpkgs used to build the machine itself
Instead of downloading archives and filling up vm disk space we can juse the nixpkgs version we already use for evaluating
2023-11-16 13:49:35 +01:00
Qubasa
a71584d9d2 Added clanName argument to clan-core.lib.builClan 2023-10-27 19:20:17 +02:00
DavHau
bf176ad277 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
588bde069f 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
Jörg Thalheim
fcd1d18e15 restore possibility to update all machines without having to specify them 2023-10-04 08:35:59 +02:00
lassulus
7ca9c49163 restore clanInternals with valid nixos config 2023-09-29 19:39:35 +02:00
Jörg Thalheim
16b33eb0a8 add toplevel machines-json that can deploy all hosts 2023-09-28 15:23:25 +02:00
Jörg Thalheim
293e7f8ae6 drop unused findNixFiles function 2023-09-28 14:21:03 +02:00
Jörg Thalheim
85f7e2f2cd clanInternals.machines: expose information as json 2023-09-27 18:42:49 +02:00
Jörg Thalheim
756820e4ca clanInternals.machines: invert system and machine name 2023-09-27 17:26:44 +02:00
Jörg Thalheim
c0799ce425 jsonschema: fix eval 2023-09-27 13:08:24 +00:00
lassulus
aeed648bd0 secrets: use clanInternal for crosscompiling, move sops generators to new file 2023-09-21 17:25:32 +02:00