summaryrefslogtreecommitdiff
path: root/modules/nix
diff options
context:
space:
mode:
authorCathal Mullan <contact@cathal.dev>2023-06-10 13:41:13 +0100
committerCathal Mullan <contact@cathal.dev>2023-06-10 13:44:37 +0100
commit51b8bdfc0e43e24ebe097f167778d4e7fe88dd77 (patch)
tree1dfcd5f0d17710baa8c66f9b7f65f187aad0a23c /modules/nix
parent7c16d31383a90e0e72ace0c35d2d66a18f90fb4f (diff)
nix: Add build machines protocol option.
Diffstat (limited to 'modules/nix')
-rw-r--r--modules/nix/default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/nix/default.nix b/modules/nix/default.nix
index cd66c59..a880941 100644
--- a/modules/nix/default.nix
+++ b/modules/nix/default.nix
@@ -227,6 +227,19 @@ in
The hostname of the build machine.
'';
};
+ protocol = mkOption {
+ type = types.enum [ null "ssh" "ssh-ng" ];
+ default = "ssh";
+ example = "ssh-ng";
+ description = lib.mdDoc ''
+ The protocol used for communicating with the build machine.
+ Use `ssh-ng` if your remote builder and your
+ local Nix version support that improved protocol.
+
+ Use `null` when trying to change the special localhost builder
+ without a protocol which is for example used by hydra.
+ '';
+ };
system = mkOption {
type = types.nullOr types.str;
default = null;
@@ -679,7 +692,7 @@ in
concatMapStrings
(machine:
(concatStringsSep " " ([
- "${optionalString (machine.sshUser != null) "${machine.sshUser}@"}${machine.hostName}"
+ "${optionalString (machine.protocol != null) "${machine.protocol}://"}${optionalString (machine.sshUser != null) "${machine.sshUser}@"}${machine.hostName}"
(if machine.system != null then machine.system else if machine.systems != [ ] then concatStringsSep "," machine.systems else "-")
(if machine.sshKey != null then machine.sshKey else "-")
(toString machine.maxJobs)