From a7a94811e3eed46aee7c8f8644a2a3737e59bddd Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 27 Jul 2022 08:51:05 +0100 Subject: [PATCH] nixos/nix-daemon: support machine protocol Make ssh-ng:// users happier. @moduon MT-904 --- nixos/modules/services/misc/nix-daemon.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index e8d2bccdbf93..bd5991448957 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -227,6 +227,16 @@ in The hostname of the build machine. ''; }; + protocol = mkOption { + type = types.enum [ "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. + ''; + }; system = mkOption { type = types.nullOr types.str; default = null; @@ -670,7 +680,7 @@ in concatMapStrings (machine: (concatStringsSep " " ([ - "${optionalString (machine.sshUser != null) "${machine.sshUser}@"}${machine.hostName}" + "${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)