diff --git a/modules/config/users-groups.nix b/modules/config/users-groups.nix index 38b11784c6d..552764b3aea 100644 --- a/modules/config/users-groups.nix +++ b/modules/config/users-groups.nix @@ -32,8 +32,8 @@ let calls in `libstore/build.cc', don't add any supplementary group here. */ uid = builtins.add ids.uids.nixbld nr; - group = "nixbld"; - extraGroups = []; + group = "nogroup"; + extraGroups = ["nixbld"]; }; nixBuildUsers = map makeNixBuildUser (pkgs.lib.range 1 10); @@ -213,16 +213,6 @@ in --groups "$extraGroups" \ ''${home:+--home "$home"} \ --shell "$shell" - if test -z "$extraGroups" - then - # Make sure the user is listed as belonging to its - # primary group when it has no supplementary groups. The - # main reason is to have the `nixbld[0-9]' users be - # listed as `nixbld' members; this allows `nix-store' to - # get the UIDs of all the build users by doing a - # getprnam("nixbld") call. - groupmod "$group" -A "$name" - fi fi done