nixos/doc/manual: Add /var/lib/nixos under “Necessary system state”

This commit is contained in:
nicoo 2023-12-12 11:26:00 +00:00
parent 735481ef6b
commit 22cb8a1712

View File

@ -6,8 +6,13 @@ can be linked from the nix store during activation.
Moreover, `/boot` should also be persistent, as it contains the kernel, initrd,
and the command-line determining the system environment's path in the nix store.
Lastly, `users.mutableUsers` should be false, *or* the following files under
`/etc` should all persist:
- {manpage}`passwd(5)` and {manpage}`group(5)`,
- {manpage}`shadow(5)` and {manpage}`gshadow(5)`,
- {manpage}`subuid(5)` and {manpage}`subgid(5)`.
## Users and groups {#sec-state-users}
- `/var/lib/nixos` should persist: it holds state needed to generate stable
uids and gids for declaratively-managed users and groups, etc.
- `users.mutableUsers` should be false, *or* the following files under `/etc`
should all persist:
- {manpage}`passwd(5)` and {manpage}`group(5)`,
- {manpage}`shadow(5)` and {manpage}`gshadow(5)`,
- {manpage}`subuid(5)` and {manpage}`subgid(5)`.