Eliminate all_nixos_configs.
This commit is contained in:
@@ -72,8 +72,6 @@
|
||||
baseConfig = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit self nix_builder;
|
||||
|
||||
all_nixos_configs = self.nixosConfigurations;
|
||||
};
|
||||
modules = [
|
||||
impermanence.nixosModules.impermanence
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
all_nixos_configs,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -76,14 +76,14 @@ let
|
||||
sshUser = "nixworker";
|
||||
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
||||
maxJobs = 1;
|
||||
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
||||
supportedFeatures = self.nixosConfigurations."${hostname}".config.me.optimizations.system_features;
|
||||
protocol = "ssh-ng";
|
||||
}
|
||||
static_host_configs."${hostname}"
|
||||
config.me.distributed_build.machines."${hostname}".additional_config
|
||||
]
|
||||
))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
) (builtins.attrNames self.nixosConfigurations)
|
||||
);
|
||||
substituters_list = (
|
||||
map (
|
||||
@@ -92,7 +92,7 @@ let
|
||||
config.me.distributed_build.machines."${hostname}".enable_substituter
|
||||
&& config.me.distributed_build.machines."${hostname}".substituter_url != null
|
||||
) (config.me.distributed_build.machines."${hostname}".substituter_url))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
) (builtins.attrNames self.nixosConfigurations)
|
||||
);
|
||||
has_any_substituters = substituters_list != [ ];
|
||||
in
|
||||
@@ -107,7 +107,9 @@ in
|
||||
description = "Whether we want to use multiple machines to perform a nixos-rebuild.";
|
||||
};
|
||||
|
||||
distributed_build.machines = lib.mapAttrs (name: value: make_machine_config name) all_nixos_configs;
|
||||
distributed_build.machines = lib.mapAttrs (
|
||||
name: value: make_machine_config name
|
||||
) self.nixosConfigurations;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.distributed_build.enable (
|
||||
|
||||
Reference in New Issue
Block a user