summary refs log tree commit diff
path: root/nixos/modules/services/misc/nix-daemon.nix
diff options
context:
space:
mode:
authorvolth <volth@webmaster.ms>2019-04-30 16:28:21 +0000
committerGitHub <noreply@github.com>2019-04-30 16:28:21 +0000
commit5a2356cff1816f8e05024f3e943f185a1288db19 (patch)
treee155047697433f10481688387695164ccad4ef4d /nixos/modules/services/misc/nix-daemon.nix
parent3d3f83dc514d4fe8716df41f6d5ccb6f217b1c25 (diff)
downloadnixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar.gz
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar.bz2
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar.lz
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar.xz
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.tar.zst
nixpkgs-5a2356cff1816f8e05024f3e943f185a1288db19.zip
nix.systemFeatures: minor refactor
Diffstat (limited to 'nixos/modules/services/misc/nix-daemon.nix')
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 62421a648e1..fe68879fda9 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -363,7 +363,6 @@ in
 
       systemFeatures = mkOption {
         type = types.listOf types.str;
-        default = [ ];
         example = [ "kvm" "big-parallel" "gccarch-skylake" ];
         description = ''
           The supported features of a machine
@@ -488,11 +487,11 @@ in
           /nix/var/nix/gcroots/tmp
       '';
 
-    nix.systemFeatures = mkIf (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
-       # can build for arch
-      mkDefault (
-        [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
-        { # can also run code for the following achritectures:
+    nix.systemFeatures = mkDefault (
+      [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
+      optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
+        # a x86_64 builder can run code for `platform.gcc.arch` and minor architectures:
+        [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ {
           "sandybridge"    = [ "gccarch-westmere" ];
           "ivybridge"      = [ "gccarch-westmere" "gccarch-sandybridge" ];
           "haswell"        = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];