From 22cb8a17128b471fca2d5aba67e8d1184abfed83 Mon Sep 17 00:00:00 2001 From: nicoo Date: Tue, 12 Dec 2023 11:26:00 +0000 Subject: [PATCH] =?UTF-8?q?nixos/doc/manual:=20Add=20`/var/lib/nixos`=20un?= =?UTF-8?q?der=20=E2=80=9CNecessary=20system=20state=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manual/administration/nixos-state.section.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/administration/nixos-state.section.md b/nixos/doc/manual/administration/nixos-state.section.md index 403195faa59d..2443918c9d7c 100644 --- a/nixos/doc/manual/administration/nixos-state.section.md +++ b/nixos/doc/manual/administration/nixos-state.section.md @@ -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)`.