From a25d983c87757a8c81f16d81bcec7fe61505f2a0 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 22 Oct 2025 18:28:09 +0200 Subject: [PATCH] modules: move introspection module into inventoryClass submodule --- modules/inventoryClass/default.nix | 14 ++++++++++++- .../inventory-introspection.nix | 20 ------------------- 2 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 modules/inventoryClass/inventory-introspection.nix diff --git a/modules/inventoryClass/default.nix b/modules/inventoryClass/default.nix index 0a95378ec..a680b5607 100644 --- a/modules/inventoryClass/default.nix +++ b/modules/inventoryClass/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, clanLib, config, ... }: let inherit (lib) types mkOption; 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" + ]; + }; }; } diff --git a/modules/inventoryClass/inventory-introspection.nix b/modules/inventoryClass/inventory-introspection.nix deleted file mode 100644 index 29ab52eec..000000000 --- a/modules/inventoryClass/inventory-introspection.nix +++ /dev/null @@ -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" - ]; - }; -}