nixos/users: isSystemUser below 1000 above 400
To reflect changes done in 23d920c8f0
This commit is contained in:
@@ -96,7 +96,7 @@ let
|
|||||||
only has an effect if <option>uid</option> is
|
only has an effect if <option>uid</option> is
|
||||||
<option>null</option>, in which case it determines whether
|
<option>null</option>, 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 <literal>isNormalUser</literal> and
|
Exactly one of <literal>isNormalUser</literal> and
|
||||||
<literal>isSystemUser</literal> must be true.
|
<literal>isSystemUser</literal> must be true.
|
||||||
@@ -635,7 +635,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.
|
||||||
|
|||||||
Reference in New Issue
Block a user