diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 256c5888cb9..aee9bb7722a 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -25,6 +25,11 @@ let options. ''; + hashedPasswordDescription = '' + To generate hashed password install mkpassword + package and run mkpasswd -m sha-512. + ''; + userOpts = { name, config, ... }: { options = { @@ -165,6 +170,7 @@ let description = '' Specifies the hashed password for the user. ${passwordDescription} + ${hashedPasswordDescription} ''; }; @@ -202,6 +208,8 @@ let password can be changed subsequently using the passwd command. Otherwise, it's equivalent to setting the option. + + ${hashedPasswordDescription} ''; }; @@ -366,21 +374,24 @@ in { type = types.bool; default = true; description = '' - If true, you are free to add new users and groups to the system + If set to true, you are free to add new users and groups to the system with the ordinary useradd and groupadd commands. On system activation, the existing contents of the /etc/passwd and /etc/group files will be merged with the contents generated from the users.extraUsers and - users.extraGroups options. If - mutableUsers is false, the contents of the user and - group files will simply be replaced on system activation. This also - holds for the user passwords; if this option is false, all changed - passwords will be reset according to the - users.extraUsers configuration on activation. If - this option is true, the initial password for a user will be set + users.extraGroups options. + The initial password for a user will be set according to users.extraUsers, but existing passwords will not be changed. + + + If set to false, the contents of the user and + group files will simply be replaced on system activation. This also + holds for the user passwords; all changed + passwords will be reset according to the + users.extraUsers configuration on activation. + ''; };