Inventory/constraints: add id's to inventory constraints to make them more observable

This commit is contained in:
Johannes Kirschbauer
2024-11-13 13:58:43 +01:00
parent 527769e060
commit 280878e30a
6 changed files with 255 additions and 229 deletions

View File

@@ -55,15 +55,12 @@ let
evalClanModulesWithRoles =
clanModules:
let
getRoles = clan-core.lib.modules.getRoles;
res = builtins.mapAttrs (
moduleName: module:
let
# module must be a path to the clanModule root by convention
# See: clanModules/flake-module.nix
roles =
assert lib.isPath module;
getRoles module;
clan-core.lib.modules.getRoles' moduleName;
in
lib.listToAttrs (
lib.map (role: {