mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-11-13 04:56:53 +03:00
users: increase default nixbld users to 32 and set knownUsers by default
Since the users.nix.configureBuildUsers target nixbld users, don't require them to be added to knownUsers explicitly.
This commit is contained in:
parent
94d2d20a5f
commit
132a7f0a09
@ -41,7 +41,7 @@ in
|
||||
name = "integer";
|
||||
check = t: isInt t && t > 1;
|
||||
};
|
||||
default = 10;
|
||||
default = 32;
|
||||
description = "Number of nixbld user accounts created to perform secure concurrent builds.";
|
||||
};
|
||||
};
|
||||
@ -57,6 +57,9 @@ in
|
||||
users.groups = mkIf cfg.nix.configureBuildUsers buildGroups;
|
||||
users.users = mkIf cfg.nix.configureBuildUsers buildUsers;
|
||||
|
||||
users.knownGroups = mkIf cfg.nix.configureBuildUsers [ "nixbld" ];
|
||||
users.knownUsers = mkIf cfg.nix.configureBuildUsers (mkUsers (i: "nixbld${toString i}"));
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,8 @@ with lib;
|
||||
{
|
||||
imports = [ <user-darwin-config> ];
|
||||
|
||||
# NOTE: don't set this outside of the installer.
|
||||
users.nix.configureBuildUsers = true;
|
||||
users.knownGroups = [ "nixbld" ];
|
||||
users.knownUsers = [ "nixbld1" "nixbld2" "nixbld3" "nixbld4" "nixbld5" "nixbld6" "nixbld7" "nixbld8" "nixbld9" "nixbld10" ];
|
||||
|
||||
system.activationScripts.preUserActivation.text = mkBefore ''
|
||||
PATH=/nix/var/nix/profiles/default/bin:$PATH
|
||||
|
Loading…
Reference in New Issue
Block a user