nixos/users: Increase maximum system uid/gid from 499 to 999
This enlarges the system uid/gid range 6-fold, from 100 to 600 ids. This is a preventative measure against running out of dynamically allocated ids for NixOS services with isSystemUser, which should become the preferred way of allocating uids for non-real users.
This commit is contained in:
@@ -6,17 +6,27 @@ with lib;
|
||||
|
||||
let
|
||||
|
||||
/*
|
||||
There are three different sources for user/group id ranges, each of which gets
|
||||
used by different programs:
|
||||
- The login.defs file, used by the useradd, groupadd and newusers commands
|
||||
- The update-users-groups.pl file, used by NixOS in the activation phase to
|
||||
decide on which ids to use for declaratively defined users without a static
|
||||
id
|
||||
- Systemd compile time options -Dsystem-uid-max= and -Dsystem-gid-max=, used
|
||||
by systemd for features like ConditionUser=@system and systemd-sysusers
|
||||
*/
|
||||
loginDefs =
|
||||
''
|
||||
DEFAULT_HOME yes
|
||||
|
||||
SYS_UID_MIN 400
|
||||
SYS_UID_MAX 499
|
||||
SYS_UID_MAX 999
|
||||
UID_MIN 1000
|
||||
UID_MAX 29999
|
||||
|
||||
SYS_GID_MIN 400
|
||||
SYS_GID_MAX 499
|
||||
SYS_GID_MAX 999
|
||||
GID_MIN 1000
|
||||
GID_MAX 29999
|
||||
|
||||
|
||||
Reference in New Issue
Block a user