diff --git a/modules/clan/interface.nix b/modules/clan/interface.nix index 8b001bed3..258b43599 100644 --- a/modules/clan/interface.nix +++ b/modules/clan/interface.nix @@ -288,7 +288,7 @@ in Global information about the clan. ''; type = types.deferredModuleWith { - staticModules = [ ../inventoryClass/meta-interface.nix ]; + staticModules = [ ../inventoryClass/meta.nix ]; }; default = { }; }; diff --git a/modules/inventoryClass/inventory.nix b/modules/inventoryClass/inventory.nix index c26390b62..9662dcb0e 100644 --- a/modules/inventoryClass/inventory.nix +++ b/modules/inventoryClass/inventory.nix @@ -115,7 +115,7 @@ in meta = lib.mkOption { type = lib.types.submoduleWith { modules = [ - ./meta-interface.nix + ./meta.nix ]; }; }; @@ -359,7 +359,7 @@ in inherit clanLib; }; } - (import ./roles-interface.nix { }) + (import ./role.nix { }) ]; } ); diff --git a/modules/inventoryClass/meta-interface.nix b/modules/inventoryClass/meta.nix similarity index 100% rename from modules/inventoryClass/meta-interface.nix rename to modules/inventoryClass/meta.nix diff --git a/modules/inventoryClass/roles-interface.nix b/modules/inventoryClass/role.nix similarity index 100% rename from modules/inventoryClass/roles-interface.nix rename to modules/inventoryClass/role.nix diff --git a/modules/inventoryClass/service-list-from-inputs.nix b/modules/inventoryClass/service-list-from-inputs.nix deleted file mode 100644 index bfeff1c2b..000000000 --- a/modules/inventoryClass/service-list-from-inputs.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - flakeInputs, - clanLib, -}: -{ lib, config, ... }: -let - inspectModule = - inputName: moduleName: module: - let - eval = clanLib.evalService { - modules = [ module ]; - prefix = [ - inputName - "clan" - "modules" - moduleName - ]; - }; - in - { - manifest = eval.config.manifest; - roles = lib.mapAttrs (_n: v: { inherit (v) description; }) eval.config.roles; - }; -in -{ - options.staticModules = lib.mkOption { - readOnly = true; - type = lib.types.raw; - - apply = moduleSet: lib.mapAttrs (inspectModule "") moduleSet; - }; - options.modulesPerSource = lib.mkOption { - # { sourceName :: { moduleName :: {} }} - readOnly = true; - type = lib.types.raw; - default = - let - inputsWithModules = lib.filterAttrs (_inputName: v: v ? clan.modules) flakeInputs; - in - lib.mapAttrs ( - inputName: v: lib.mapAttrs (inspectModule inputName) v.clan.modules - ) 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 { - # { sourceName :: { moduleName :: {} }} - readOnly = true; - type = lib.types.raw; - default = - let - inputsWithTemplates = lib.filterAttrs (_inputName: v: v ? clan.templates) flakeInputs; - in - lib.mapAttrs (_inputName: v: lib.mapAttrs (_n: t: t) v.clan.templates) inputsWithTemplates; - - }; -} diff --git a/pkgs/option-search/flake-module.nix b/pkgs/option-search/flake-module.nix index 284e92dff..9e7628371 100644 --- a/pkgs/option-search/flake-module.nix +++ b/pkgs/option-search/flake-module.nix @@ -118,7 +118,7 @@ _file = "docs flake-module"; imports = [ { _module.args = { inherit clanLib; }; } - (import ../../modules/inventoryClass/roles-interface.nix { + (import ../../modules/inventoryClass/role.nix { nestedSettingsOption = mkOption { type = types.raw; description = ''