Inventory: allow arbitrary imports from nix

This commit is contained in:
Johannes Kirschbauer
2024-09-15 16:43:36 +02:00
committed by hsjobeki
parent 7e0308fac6
commit bc56ce3f4c
2 changed files with 7 additions and 2 deletions

View File

@@ -145,7 +145,7 @@ let
builtins.map (role: serviceConfig.roles.${role}.config or { }) inverseRoles.${machineName} or [ ] builtins.map (role: serviceConfig.roles.${role}.config or { }) inverseRoles.${machineName} or [ ]
); );
customImports = map (s: "${directory}/${s}") ( customImports = map (s: if builtins.typeOf s == "string" then "${directory}/${s}" else s) (
globalImports ++ machineImports ++ roleServiceImports globalImports ++ machineImports ++ roleServiceImports
); );
in in

View File

@@ -61,7 +61,12 @@ let
''; '';
default = [ ]; default = [ ];
type = types.listOf types.str; type = types.listOf (
types.oneOf [
types.str
types.anything
]
);
}; };
in in
{ {