summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2022-09-29 15:48:05 +0200
committerGitHub <noreply@github.com>2022-09-29 15:48:05 +0200
commit3f7fa3fe689ef8e94f2b317ddf812f803378e209 (patch)
tree07bebf8682ea1508a5d73c2ae11ab8efadc87f2d /nixos
parent46fc0f497b9cf73ae2a445c252e96d1ad8710f40 (diff)
parent6349a7d15b3dd35eb6d9e08c161eece1fc60c77a (diff)
Merge pull request #193404 from evrim/master
nix-daemon module: fix mandatoryFeatures in nix.buildMachines
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index bd59914489577..4b199aa22b50c 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -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"