schema: update clan option source

This commit is contained in:
Johannes Kirschbauer
2025-06-26 13:00:23 +02:00
parent 9196de993d
commit 6c460db016
3 changed files with 15 additions and 5 deletions

View File

@@ -34,6 +34,7 @@
Public attributes of buildClan. As specified in publicAttrs.
*/
buildClanWith =
{
clan-core,
# TODO: Below should be module options such that the user can override them?

View File

@@ -1,6 +1,7 @@
{
self,
self',
lib,
pkgs,
flakeOptions,
...
@@ -23,7 +24,19 @@ let
_module.args = { inherit (self) clanLib; };
});
clanSchema = jsonLib.parseOptions (flakeOptions.clan.type.getSubOptions [ "clan" ]) { };
opts = (flakeOptions.flake.type.getSubOptions [ "flake" ]);
clanOpts = opts.clan.type.getSubOptions [ "clan" ];
include = [
"directory"
"inventory"
"machines"
"meta"
"modules"
"outputs"
"secrets"
"templates"
];
clanSchema = jsonLib.parseOptions (lib.filterAttrs (n: _v: lib.elem n include) clanOpts) { };
renderSchema = pkgs.writers.writePython3Bin "render-schema" {
flakeIgnore = [