forked from mirrors/nixpkgs
nix-daemon: Sanity check maxJobs vs nrBuildUsers
This commit is contained in:
parent
750c09c967
commit
d41367735d
|
@ -323,7 +323,12 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
users.extraUsers = map makeNixBuildUser (range 1 cfg.nrBuildUsers);
|
||||
users.extraUsers =
|
||||
if cfg.nrBuildUsers >= cfg.maxJobs then
|
||||
map makeNixBuildUser (range 1 cfg.nrBuildUsers)
|
||||
else
|
||||
throw "Not enough build users (${cfg.nrBuildUsers}) to support ${cfg.maxJobs} build jobs. Change nrBuildUsers or maxJobs."
|
||||
;
|
||||
|
||||
system.activationScripts.nix = stringAfter [ "etc" "users" ]
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue