Skip to content

Commit

Permalink
nix-daemon: Bump the default number of build users
Browse files Browse the repository at this point in the history
While it's annoying to pollute the user database with a lot of nixbld*
users, 10 users is really too low for many modern systems.
  • Loading branch information
edolstra committed Sep 27, 2017
1 parent d0d992a commit 79d547b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/nix-daemon.nix
Expand Up @@ -428,7 +428,7 @@ in
fi
'';

nix.nrBuildUsers = mkDefault (lib.max 10 cfg.maxJobs);
nix.nrBuildUsers = mkDefault (lib.max 32 cfg.maxJobs);

users.extraUsers = nixbldUsers;

Expand Down

3 comments on commit 79d547b

@copumpkin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edolstra If we turned on sandboxes (with user namespaces) by default, we wouldn't have to pollute the user database, right? 😄 😄

@edolstra
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because we still need a different uid per build. (PID namespaces give some isolation between builds, but probably not enough to rely on. Also, we do kill(-uid) to kill any lingering processes at the end of a build.)

@copumpkin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boo!

Please sign in to comment.