diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-04-07 08:21:02 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-04-07 08:45:56 +0100 |
commit | e6a15db534d18d0eefb5916ee87b4951d51af2cf (patch) | |
tree | 69d2eb71b8dbb7fb0debecdefa253b1c3b844074 /nixos/modules/services/misc | |
parent | 5d3f4e9c0b9c3ccfbd48e5b472ad064215fd4a28 (diff) | |
download | nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar.gz nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar.bz2 nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar.lz nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar.xz nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.tar.zst nixlib-e6a15db534d18d0eefb5916ee87b4951d51af2cf.zip |
nixos: default nix.maxJobs to auto
Instead of making the configuration less portable by hard coding the number of jobs equal to the cores we can also let nix set the same number at runtime.
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 8203cb13e506..e14df310ae87 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -92,13 +92,14 @@ in maxJobs = mkOption { type = types.either types.int (types.enum ["auto"]); - default = 1; + default = "auto"; example = 64; description = '' - This option defines the maximum number of jobs that Nix will try - to build in parallel. The default is 1. You should generally - set it to the total number of logical cores in your system (e.g., 16 - for two CPUs with 4 cores each and hyper-threading). + This option defines the maximum number of jobs that Nix will try to + build in parallel. The default is auto, which means it will use all + available logical cores. It is recommend to set it to the total + number of logical cores in your system (e.g., 16 for two CPUs with 4 + cores each and hyper-threading). ''; }; |