modules: move introspection module into inventoryClass submodule
This commit is contained in:
@@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user