MyNixOS website logo
option

users.users.<name>.hashedPassword

Specifies the hashed password for the user. The options hashedPassword, password and hashedPasswordFile controls what password is set for the user. hashedPassword overrides both password and hashedPasswordFile. password overrides hashedPasswordFile. If none of these three options are set, no password is assigned to the user, and the user will not be able to do password logins. If the option users.mutableUsers is true, the password defined in one of the three options will only be set when the user is created for the first time. After that, you are free to change the password with the ordinary user management commands. If users.mutableUsers is false, you cannot change user passwords, they will always be set according to the password options.

To generate a hashed password run mkpasswd.

If set to an empty string (""), this user will be able to log in without being asked for a password (but not via remote services such as SSH, or indirectly via su or sudo). This should only be used for e.g. bootable live systems. Note: this is different from setting an empty password, which can be achieved using users.users.<name?>.password.

If set to null (default) this user will not be able to log in using a password (i.e. via login command).

Declarations
Type
null or (string, not containing newlines or colons)
Default
null