diff --git a/lib/build-clan/default.nix b/lib/build-clan/default.nix index 2fe3fed26..35401dd1c 100644 --- a/lib/build-clan/default.nix +++ b/lib/build-clan/default.nix @@ -78,15 +78,22 @@ let # Will be deprecated { - 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. - lib.mkForce { - inherit name; - system = (machineSettings name).nixpkgs.hostSystem or null; - } - ) machinesDirs; + 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. + lib.mkForce { + inherit name; + system = (machineSettings name).nixpkgs.hostSystem or null; + } + ) + ( + lib.filterAttrs ( + machineName: _: builtins.pathExists "${directory}/machines/${machineName}/settings.json" + ) machinesDirs + ); } # Deprecated interface diff --git a/templates/flake-parts/flake.nix b/templates/flake-parts/flake.nix index 47b3e1f9f..b093b1766 100644 --- a/templates/flake-parts/flake.nix +++ b/templates/flake-parts/flake.nix @@ -99,7 +99,6 @@ */ # clan.core.networking.zerotier.networkId = builtins.readFile ../jon/facts/zerotier-network-id; }; - }; }; perSystem =