Merge pull request 'Refactor(inventory): move prio 'introspection' into inventoryClass to minimize the 'clanInternals' api' (#3440) from hsjobeki/clan-core:ui-fixups into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3440
This commit is contained in:
hsjobeki
2025-04-30 10:24:34 +00:00
5 changed files with 22 additions and 7 deletions

View File

@@ -33,6 +33,7 @@ let
}) config.distributedServices.allMachines;
}
)
(lib.modules.importApply ./inventory-introspection.nix { inherit clanLib; })
];
}).config;
in

View 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" ];
};
}