Merge pull request 'Inventory: only apply if settings.json exists' (#1753) from hsjobeki/clan-core:hsjobeki-main into main
This commit is contained in:
@@ -78,7 +78,9 @@ let
|
||||
|
||||
# Will be deprecated
|
||||
{
|
||||
machines = lib.mapAttrs (
|
||||
machines =
|
||||
lib.mapAttrs
|
||||
(
|
||||
name: _:
|
||||
# Use mkForce to make sure users migrate to the inventory system.
|
||||
# When the settings.json exists the evaluation will print the deprecation warning.
|
||||
@@ -86,7 +88,12 @@ let
|
||||
inherit name;
|
||||
system = (machineSettings name).nixpkgs.hostSystem or null;
|
||||
}
|
||||
) machinesDirs;
|
||||
)
|
||||
(
|
||||
lib.filterAttrs (
|
||||
machineName: _: builtins.pathExists "${directory}/machines/${machineName}/settings.json"
|
||||
) machinesDirs
|
||||
);
|
||||
}
|
||||
|
||||
# Deprecated interface
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
*/
|
||||
# clan.core.networking.zerotier.networkId = builtins.readFile ../jon/facts/zerotier-network-id;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
perSystem =
|
||||
|
||||
Reference in New Issue
Block a user