summary refs log tree commit diff
path: root/nixos/modules/services/misc/nix-daemon.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2014-10-31 15:49:18 +0300
committerNikolay Amiantov <ab@fmap.me>2014-11-01 23:58:21 +0300
commite8dace201f36410487f6631ca57a0fc0696d7561 (patch)
tree167cbdaf1a1d510d3f833268c730c5d4fabaf2f9 /nixos/modules/services/misc/nix-daemon.nix
parentb4f9d587faf3a53cc654b8900fa93c7af3848267 (diff)
downloadnixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar.gz
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar.bz2
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar.lz
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar.xz
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.tar.zst
nixpkgs-e8dace201f36410487f6631ca57a0fc0696d7561.zip
nix-daemon: add maxCores option
Diffstat (limited to 'nixos/modules/services/misc/nix-daemon.nix')
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index c98c0511b56..4b398979fba 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -36,6 +36,7 @@ let
         # /etc/nixos/configuration.nix.  Do not edit it!
         build-users-group = nixbld
         build-max-jobs = ${toString (cfg.maxJobs)}
+        build-cores = ${toString (cfg.buildCores)}
         build-use-chroot = ${if cfg.useChroot then "true" else "false"}
         build-chroot-dirs = ${toString cfg.chrootDirs} /bin/sh=${sh} $(echo $extraPaths)
         binary-caches = ${toString cfg.binaryCaches}
@@ -74,6 +75,19 @@ in
         ";
       };
 
+      buildCores = mkOption {
+        type = types.int;
+        default = 1;
+        example = 64;
+        description = ''
+          This option defines the maximum number of concurrent tasks during
+          one build. It affects, e.g., -j option for make. The default is 1.
+          Some builds may become non-deterministic with this option; use with
+          care! Packages will only be affected if enableParallelBuilding is
+          set for them.
+        '';
+      };
+
       useChroot = mkOption {
         type = types.bool;
         default = false;