modules: move introspection module into inventoryClass submodule

This commit is contained in:
Johannes Kirschbauer
2025-10-22 18:28:09 +02:00
parent 843f55f844
commit a25d983c87
2 changed files with 13 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
{ lib, ... }: { lib, clanLib, config, ... }:
let let
inherit (lib) types mkOption; inherit (lib) types mkOption;
submodule = m: types.submoduleWith { modules = [ m ]; }; submodule = m: types.submoduleWith { modules = [ m ]; };
@@ -23,5 +23,17 @@ in
}; };
})); }));
}; };
introspection = lib.mkOption {
readOnly = true;
# TODO: use options.inventory instead of the evaluate config attribute
default =
builtins.removeAttrs (clanLib.introspection.getPrios { options = config.inventory.options; })
# tags are freeformType which is not supported yet.
# services is removed and throws an error if accessed.
[
"tags"
"services"
];
};
}; };
} }

View File

@@ -1,20 +0,0 @@
{
config,
lib,
clanLib,
...
}:
{
options.introspection = lib.mkOption {
readOnly = true;
# TODO: use options.inventory instead of the evaluate config attribute
default =
builtins.removeAttrs (clanLib.introspection.getPrios { options = config.inventory.options; })
# tags are freeformType which is not supported yet.
# services is removed and throws an error if accessed.
[
"tags"
"services"
];
};
}