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