Merge pull request #153127 from eyJhb/user-uids-fix
nixos/users+nixos/lightdm: fixed users starting at 1000, and system users below 1000
This commit is contained in:
@@ -90,7 +90,7 @@ let
|
|||||||
only has an effect if {option}`uid` is
|
only has an effect if {option}`uid` is
|
||||||
{option}`null`, in which case it determines whether
|
{option}`null`, in which case it determines whether
|
||||||
the user's UID is allocated in the range for system users
|
the user's UID is allocated in the range for system users
|
||||||
(below 500) or in the range for normal users (starting at
|
(below 1000) or in the range for normal users (starting at
|
||||||
1000).
|
1000).
|
||||||
Exactly one of `isNormalUser` and
|
Exactly one of `isNormalUser` and
|
||||||
`isSystemUser` must be true.
|
`isSystemUser` must be true.
|
||||||
@@ -677,7 +677,7 @@ in {
|
|||||||
{
|
{
|
||||||
assertion = let
|
assertion = let
|
||||||
xor = a: b: a && !b || b && !a;
|
xor = a: b: a && !b || b && !a;
|
||||||
isEffectivelySystemUser = user.isSystemUser || (user.uid != null && user.uid < 500);
|
isEffectivelySystemUser = user.isSystemUser || (user.uid != null && user.uid < 1000);
|
||||||
in xor isEffectivelySystemUser user.isNormalUser;
|
in xor isEffectivelySystemUser user.isNormalUser;
|
||||||
message = ''
|
message = ''
|
||||||
Exactly one of users.users.${user.name}.isSystemUser and users.users.${user.name}.isNormalUser must be set.
|
Exactly one of users.users.${user.name}.isSystemUser and users.users.${user.name}.isNormalUser must be set.
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ let
|
|||||||
usersConf = writeText "users.conf"
|
usersConf = writeText "users.conf"
|
||||||
''
|
''
|
||||||
[UserList]
|
[UserList]
|
||||||
minimum-uid=500
|
minimum-uid=1000
|
||||||
hidden-users=${concatStringsSep " " dmcfg.hiddenUsers}
|
hidden-users=${concatStringsSep " " dmcfg.hiddenUsers}
|
||||||
hidden-shells=/run/current-system/sw/bin/nologin
|
hidden-shells=/run/current-system/sw/bin/nologin
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user