mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Merge pull request #205 from Mic92/nix-daemon
nix: better defaults settings for maxJobs/buildCores
This commit is contained in:
commit
5c7d050e20
4 changed files with 9 additions and 23 deletions
|
@ -469,9 +469,4 @@
|
|||
|
||||
users.nix.configureBuildUsers = true;
|
||||
users.nix.nrBuildUsers = 32;
|
||||
|
||||
# You should generally set this to the total number of logical cores in your system.
|
||||
# $ sysctl -n hw.ncpu
|
||||
nix.maxJobs = 1;
|
||||
nix.buildCores = 1;
|
||||
}
|
||||
|
|
|
@ -26,9 +26,4 @@ with lib;
|
|||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
# You should generally set this to the total number of logical cores in your system.
|
||||
# $ sysctl -n hw.ncpu
|
||||
nix.maxJobs = 1;
|
||||
nix.buildCores = 1;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,4 @@
|
|||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
# You should generally set this to the total number of logical cores in your system.
|
||||
# $ sysctl -n hw.ncpu
|
||||
nix.maxJobs = 1;
|
||||
nix.buildCores = 1;
|
||||
}
|
||||
|
|
|
@ -82,24 +82,25 @@ in
|
|||
};
|
||||
|
||||
nix.maxJobs = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
type = types.either types.int (types.enum ["auto"]);
|
||||
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).
|
||||
'';
|
||||
};
|
||||
|
||||
nix.buildCores = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
default = 0;
|
||||
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.
|
||||
one build. It affects, e.g., -j option for make.
|
||||
The special value 0 means that the builder should use all
|
||||
available CPU cores in the system. Some builds may become
|
||||
non-deterministic with this option; use with care! Packages will
|
||||
|
|
Loading…
Reference in a new issue