nixos/nix-daemon: allow removing protocol for hydra

This commit is contained in:
Sandro Jäckel 2022-09-26 11:50:19 +02:00
parent a34c70c2a2
commit 2970778928
No known key found for this signature in database
GPG key ID: B1763F8651144063

View file

@ -228,13 +228,16 @@ in
''; '';
}; };
protocol = mkOption { protocol = mkOption {
type = types.enum [ "ssh" "ssh-ng" ]; type = types.enum [ null "ssh" "ssh-ng" ];
default = "ssh"; default = "ssh";
example = "ssh-ng"; example = "ssh-ng";
description = lib.mdDoc '' description = lib.mdDoc ''
The protocol used for communicating with the build machine. The protocol used for communicating with the build machine.
Use `ssh-ng` if your remote builder and your Use `ssh-ng` if your remote builder and your
local Nix version support that improved protocol. 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 { system = mkOption {
@ -680,7 +683,7 @@ in
concatMapStrings concatMapStrings
(machine: (machine:
(concatStringsSep " " ([ (concatStringsSep " " ([
"${machine.protocol}://${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.system != null then machine.system else if machine.systems != [ ] then concatStringsSep "," machine.systems else "-")
(if machine.sshKey != null then machine.sshKey else "-") (if machine.sshKey != null then machine.sshKey else "-")
(toString machine.maxJobs) (toString machine.maxJobs)