Merge pull request 'Inventory: only apply if settings.json exists' (#1753) from hsjobeki/clan-core:hsjobeki-main into main

This commit is contained in:
clan-bot
2024-07-15 17:18:20 +00:00
2 changed files with 16 additions and 10 deletions

View File

@@ -78,15 +78,22 @@ let
# Will be deprecated # Will be deprecated
{ {
machines = lib.mapAttrs ( machines =
name: _: lib.mapAttrs
# Use mkForce to make sure users migrate to the inventory system. (
# When the settings.json exists the evaluation will print the deprecation warning. name: _:
lib.mkForce { # Use mkForce to make sure users migrate to the inventory system.
inherit name; # When the settings.json exists the evaluation will print the deprecation warning.
system = (machineSettings name).nixpkgs.hostSystem or null; lib.mkForce {
} inherit name;
) machinesDirs; system = (machineSettings name).nixpkgs.hostSystem or null;
}
)
(
lib.filterAttrs (
machineName: _: builtins.pathExists "${directory}/machines/${machineName}/settings.json"
) machinesDirs
);
} }
# Deprecated interface # Deprecated interface

View File

@@ -99,7 +99,6 @@
*/ */
# clan.core.networking.zerotier.networkId = builtins.readFile ../jon/facts/zerotier-network-id; # clan.core.networking.zerotier.networkId = builtins.readFile ../jon/facts/zerotier-network-id;
}; };
}; };
}; };
perSystem = perSystem =