summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/build-client.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/build-client.nix b/modules/build-client.nix
index 763fdb38..cedfc2eb 100644
--- a/modules/build-client.nix
+++ b/modules/build-client.nix
@@ -6,6 +6,7 @@ let
6 cfg = config.nix.buildServers; 6 cfg = config.nix.buildServers;
7 7
8 secretName = name: "nix-ssh-builder-${name}-private"; 8 secretName = name: "nix-ssh-builder-${name}-private";
9 hostName = host: "nix-ssh-builder-${host}";
9in { 10in {
10 options = { 11 options = {
11 nix = { 12 nix = {
@@ -87,7 +88,7 @@ in {
87 88
88 config = mkIf (cfg != {}) { 89 config = mkIf (cfg != {}) {
89 programs.ssh.extraConfig = concatMapStringsSep "\n" ({ name, value }: '' 90 programs.ssh.extraConfig = concatMapStringsSep "\n" ({ name, value }: ''
90 Host ${name} 91 Host ${hostName name}
91 User nix-ssh-builder 92 User nix-ssh-builder
92 HostName ${value.address} 93 HostName ${value.address}
93 IdentitiesOnly yes 94 IdentitiesOnly yes
@@ -103,6 +104,6 @@ in {
103 104
104 sops.secrets = mapAttrs' (name: hCfg: nameValuePair (secretName name) { sopsFile = ../system-profiles/build-server/clients + "/${hostName}/private"; format = "binary"; }) cfg; 105 sops.secrets = mapAttrs' (name: hCfg: nameValuePair (secretName name) { sopsFile = ../system-profiles/build-server/clients + "/${hostName}/private"; format = "binary"; }) cfg;
105 106
106 nix.buildMachines = mapAttrsToList (hostName: hCfg: { inherit hostName; inherit (hCfg) system systems maxJobs speedFactor mandatoryFeatures supportedFeatures; }) cfg; 107 nix.buildMachines = mapAttrsToList (name: hCfg: { hostName = hostName name; inherit (hCfg) system systems maxJobs speedFactor mandatoryFeatures supportedFeatures; }) cfg;
107 }; 108 };
108} 109}