summaryrefslogtreecommitdiff
path: root/modules/build-client.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-10-02 11:35:08 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-10-02 11:35:08 +0200
commit6ee516b4efae723115385db414595ef02be76811 (patch)
treeb7742686fd8ae187dcbe202fb0a16bfeea366880 /modules/build-client.nix
parentf2f265d109493f64fae3a26ae2daacfeec2b5e56 (diff)
downloadnixos-6ee516b4efae723115385db414595ef02be76811.tar
nixos-6ee516b4efae723115385db414595ef02be76811.tar.gz
nixos-6ee516b4efae723115385db414595ef02be76811.tar.bz2
nixos-6ee516b4efae723115385db414595ef02be76811.tar.xz
nixos-6ee516b4efae723115385db414595ef02be76811.zip
build-client: ...
Diffstat (limited to 'modules/build-client.nix')
-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}