Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api
This commit is contained in:
@@ -33,6 +33,7 @@ let
|
||||
}) config.distributedServices.allMachines;
|
||||
}
|
||||
)
|
||||
(lib.modules.importApply ./inventory-introspection.nix { inherit clanLib; })
|
||||
];
|
||||
}).config;
|
||||
in
|
||||
|
||||
17
lib/inventory/build-inventory/inventory-introspection.nix
Normal file
17
lib/inventory/build-inventory/inventory-introspection.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ clanLib }:
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
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.
|
||||
[ "tags" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user