nix-daemon module: fix mandatoryFeatures in nix.buildMachines

This commit is contained in:
void 2022-09-29 00:35:17 +03:00
parent b247187fed
commit 6349a7d15b

View File

@ -685,8 +685,10 @@ in
(if machine.sshKey != null then machine.sshKey else "-")
(toString machine.maxJobs)
(toString machine.speedFactor)
(concatStringsSep "," (machine.supportedFeatures ++ machine.mandatoryFeatures))
(concatStringsSep "," machine.mandatoryFeatures)
(let res = (machine.supportedFeatures ++ machine.mandatoryFeatures);
in if (res == []) then "-" else (concatStringsSep "," res))
(let res = machine.mandatoryFeatures;
in if (res == []) then "-" else (concatStringsSep "," machine.mandatoryFeatures))
]
++ optional (isNixAtLeast "2.4pre") (if machine.publicHostKey != null then machine.publicHostKey else "-")))
+ "\n"