mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
nixos/users-groups: convert remaining descriptions to MD
manpage is unchanged, html change is only in whitespace
This commit is contained in:
parent
a2ceee8ffe
commit
7f6d0d1674
@ -17,35 +17,35 @@ let
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
passwordDescription = ''
|
passwordDescription = ''
|
||||||
The options <option>hashedPassword</option>,
|
The options {option}`hashedPassword`,
|
||||||
<option>password</option> and <option>passwordFile</option>
|
{option}`password` and {option}`passwordFile`
|
||||||
controls what password is set for the user.
|
controls what password is set for the user.
|
||||||
<option>hashedPassword</option> overrides both
|
{option}`hashedPassword` overrides both
|
||||||
<option>password</option> and <option>passwordFile</option>.
|
{option}`password` and {option}`passwordFile`.
|
||||||
<option>password</option> overrides <option>passwordFile</option>.
|
{option}`password` overrides {option}`passwordFile`.
|
||||||
If none of these three options are set, no password is assigned to
|
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.
|
the user, and the user will not be able to do password logins.
|
||||||
If the option <option>users.mutableUsers</option> is true, the
|
If the option {option}`users.mutableUsers` is true, the
|
||||||
password defined in one of the three options will only be set when
|
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
|
the user is created for the first time. After that, you are free to
|
||||||
change the password with the ordinary user management commands. If
|
change the password with the ordinary user management commands. If
|
||||||
<option>users.mutableUsers</option> is false, you cannot change
|
{option}`users.mutableUsers` is false, you cannot change
|
||||||
user passwords, they will always be set according to the password
|
user passwords, they will always be set according to the password
|
||||||
options.
|
options.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hashedPasswordDescription = ''
|
hashedPasswordDescription = ''
|
||||||
To generate a hashed password run <literal>mkpasswd -m sha-512</literal>.
|
To generate a hashed password run `mkpasswd -m sha-512`.
|
||||||
|
|
||||||
If set to an empty string (<literal>""</literal>), this user will
|
If set to an empty string (`""`), this user will
|
||||||
be able to log in without being asked for a password (but not via remote
|
be able to log in without being asked for a password (but not via remote
|
||||||
services such as SSH, or indirectly via <command>su</command> or
|
services such as SSH, or indirectly via {command}`su` or
|
||||||
<command>sudo</command>). This should only be used for e.g. bootable
|
{command}`sudo`). This should only be used for e.g. bootable
|
||||||
live systems. Note: this is different from setting an empty password,
|
live systems. Note: this is different from setting an empty password,
|
||||||
which can be achieved using <option>users.users.<name?>.password</option>.
|
which can be achieved using {option}`users.users.<name?>.password`.
|
||||||
|
|
||||||
If set to <literal>null</literal> (default) this user will not
|
If set to `null` (default) this user will not
|
||||||
be able to log in using a password (i.e. via <command>login</command>
|
be able to log in using a password (i.e. via {command}`login`
|
||||||
command).
|
command).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ let
|
|||||||
hashedPassword = mkOption {
|
hashedPassword = mkOption {
|
||||||
type = with types; nullOr (passwdEntry str);
|
type = with types; nullOr (passwdEntry str);
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = lib.mdDoc ''
|
||||||
Specifies the hashed password for the user.
|
Specifies the hashed password for the user.
|
||||||
${passwordDescription}
|
${passwordDescription}
|
||||||
${hashedPasswordDescription}
|
${hashedPasswordDescription}
|
||||||
@ -244,7 +244,7 @@ let
|
|||||||
password = mkOption {
|
password = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = lib.mdDoc ''
|
||||||
Specifies the (clear text) password for the user.
|
Specifies the (clear text) password for the user.
|
||||||
Warning: do not set confidential information here
|
Warning: do not set confidential information here
|
||||||
because it is world-readable in the Nix store. This option
|
because it is world-readable in the Nix store. This option
|
||||||
@ -256,11 +256,11 @@ let
|
|||||||
passwordFile = mkOption {
|
passwordFile = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = lib.mdDoc ''
|
||||||
The full path to a file that contains the user's password. The password
|
The full path to a file that contains the user's password. The password
|
||||||
file is read on each system activation. The file should contain
|
file is read on each system activation. The file should contain
|
||||||
exactly one line, which should be the password in an encrypted form
|
exactly one line, which should be the password in an encrypted form
|
||||||
that is suitable for the <literal>chpasswd -e</literal> command.
|
that is suitable for the `chpasswd -e` command.
|
||||||
${passwordDescription}
|
${passwordDescription}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -268,13 +268,13 @@ let
|
|||||||
initialHashedPassword = mkOption {
|
initialHashedPassword = mkOption {
|
||||||
type = with types; nullOr (passwdEntry str);
|
type = with types; nullOr (passwdEntry str);
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = lib.mdDoc ''
|
||||||
Specifies the initial hashed password for the user, i.e. the
|
Specifies the initial hashed password for the user, i.e. the
|
||||||
hashed password assigned if the user does not already
|
hashed password assigned if the user does not already
|
||||||
exist. If <option>users.mutableUsers</option> is true, the
|
exist. If {option}`users.mutableUsers` is true, the
|
||||||
password can be changed subsequently using the
|
password can be changed subsequently using the
|
||||||
<command>passwd</command> command. Otherwise, it's
|
{command}`passwd` command. Otherwise, it's
|
||||||
equivalent to setting the <option>hashedPassword</option> option.
|
equivalent to setting the {option}`hashedPassword` option.
|
||||||
|
|
||||||
${hashedPasswordDescription}
|
${hashedPasswordDescription}
|
||||||
'';
|
'';
|
||||||
@ -458,25 +458,25 @@ in {
|
|||||||
users.mutableUsers = mkOption {
|
users.mutableUsers = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = lib.mdDoc ''
|
||||||
If set to <literal>true</literal>, 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 <literal>useradd</literal> and
|
with the ordinary `useradd` and
|
||||||
<literal>groupadd</literal> commands. On system activation, the
|
`groupadd` commands. On system activation, the
|
||||||
existing contents of the <literal>/etc/passwd</literal> and
|
existing contents of the `/etc/passwd` and
|
||||||
<literal>/etc/group</literal> files will be merged with the
|
`/etc/group` files will be merged with the
|
||||||
contents generated from the <literal>users.users</literal> and
|
contents generated from the `users.users` and
|
||||||
<literal>users.groups</literal> options.
|
`users.groups` options.
|
||||||
The initial password for a user will be set
|
The initial password for a user will be set
|
||||||
according to <literal>users.users</literal>, but existing passwords
|
according to `users.users`, but existing passwords
|
||||||
will not be changed.
|
will not be changed.
|
||||||
|
|
||||||
<warning><para>
|
::: {.warning}
|
||||||
If set to <literal>false</literal>, the contents of the user and
|
If set to `false`, the contents of the user and
|
||||||
group files will simply be replaced on system activation. This also
|
group files will simply be replaced on system activation. This also
|
||||||
holds for the user passwords; all changed
|
holds for the user passwords; all changed
|
||||||
passwords will be reset according to the
|
passwords will be reset according to the
|
||||||
<literal>users.users</literal> configuration on activation.
|
`users.users` configuration on activation.
|
||||||
</para></warning>
|
:::
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user