fixup! Inventory: add machines automatically from machines dir
This commit is contained in:
committed by
hsjobeki
parent
924fb8a620
commit
82c725a605
@@ -223,6 +223,14 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
# Merge the inventory file
|
# Merge the inventory file
|
||||||
{ inventory = inventoryLoaded; }
|
{ inventory = inventoryLoaded; }
|
||||||
|
# TODO: Figure out why this causes infinite recursion
|
||||||
|
{
|
||||||
|
inventory.machines = lib.optionalAttrs (builtins.pathExists "${directory}/machines") (
|
||||||
|
builtins.mapAttrs (_n: _v: { }) (
|
||||||
|
(lib.filterAttrs (_: t: t == "directory") (builtins.readDir "${directory}/machines"))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
# Merge the meta attributes from the buildClan function
|
# Merge the meta attributes from the buildClan function
|
||||||
{ inventory.meta = if config.meta != null then config.meta else { }; }
|
{ inventory.meta = if config.meta != null then config.meta else { }; }
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user