@@ -36,6 +36,7 @@ let
36 # /etc/nixos/configuration.nix. Do not edit it!
36 # /etc/nixos/configuration.nix. Do not edit it!
37 build-users-group = nixbld
37 build-users-group = nixbld
38 build-max-jobs = ${toString (cfg.maxJobs)}
38 build-max-jobs = ${toString (cfg.maxJobs)}
39+ build-cores = ${toString (cfg.buildCores)}
39 build-use-chroot = ${if cfg.useChroot then "true" else "false"}
40 build-use-chroot = ${if cfg.useChroot then "true" else "false"}
40 build-chroot-dirs = ${toString cfg.chrootDirs} /bin/sh=${sh} $(echo $extraPaths)
41 build-chroot-dirs = ${toString cfg.chrootDirs} /bin/sh=${sh} $(echo $extraPaths)
41 binary-caches = ${toString cfg.binaryCaches}
42 binary-caches = ${toString cfg.binaryCaches}
@@ -74,6 +75,19 @@ in
78+ buildCores = mkOption {
83+ This option defines the maximum number of concurrent tasks during
84+ one build. It affects, e.g., -j option for make. The default is 1.
85+ Some builds may become non-deterministic with this option; use with
86+ care! Packages will only be affected if enableParallelBuilding is
77 useChroot = mkOption {
91 useChroot = mkOption {
78 type = types.bool;
92 type = types.bool;
79 default = false;
93 default = false;