services: add modules schema to inventoryClass

This commit is contained in:
Johannes Kirschbauer
2025-07-13 14:16:23 +02:00
parent b0a1f5e0c7
commit e7c9d1e6d0

View File

@@ -35,6 +35,21 @@ in
inputName: v: lib.mapAttrs (inspectModule inputName) v.clan.modules inputName: v: lib.mapAttrs (inspectModule inputName) v.clan.modules
) inputsWithModules; ) inputsWithModules;
}; };
options.moduleSchemas = lib.mkOption {
# { sourceName :: { moduleName :: { roleName :: Schema }}}
readOnly = true;
type = lib.types.raw;
default = lib.mapAttrs (
_inputName: moduleSet:
lib.mapAttrs (
_moduleName: module:
(clanLib.evalService {
modules = [ module ];
prefix = [ ];
}).config.result.api.schema
) moduleSet
) config.modulesPerSource;
};
options.templatesPerSource = lib.mkOption { options.templatesPerSource = lib.mkOption {
# { sourceName :: { moduleName :: {} }} # { sourceName :: { moduleName :: {} }}
readOnly = true; readOnly = true;