mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
user/group assertion to not exceed the 32 character limit
(cherry picked from commit 1b0cb040d9)
(original PR: #36556)
This commit is contained in:
committed by
Vladimír Čunát
parent
834d892989
commit
0a224fe280
@@ -35,6 +35,7 @@ let
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
apply = x: assert (builtins.stringLength x < 32 || abort "Username '${x}' is longer than 31 characters which is not allowed!"); x;
|
||||
description = ''
|
||||
The name of the user account. If undefined, the name of the
|
||||
attribute set will be used.
|
||||
@@ -91,6 +92,7 @@ let
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
apply = x: assert (builtins.stringLength x < 17 || abort "Group name '${x}' is longer than 16 characters which is not allowed!"); x;
|
||||
default = "nogroup";
|
||||
description = "The user's primary group.";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user