mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
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 New Issue
Block a user