1# NixOS {#sec-nixos-state} 2 3## `/nix` {#sec-state-nix} 4 5NixOS needs the entirety of `/nix` to be persistent, as it includes: 6- `/nix/store`, which contains all the system's executables, libraries, and supporting data; 7- `/nix/var/nix`, which contains: 8 - the Nix daemon's database; 9 - roots whose transitive closure is preserved when garbage-collecting the Nix store; 10 - system-wide and per-user profiles. 11 12## `/boot` {#sec-state-boot} 13 14`/boot` should also be persistent, as it contains: 15- the kernel and initrd which the bootloader loads, 16- the bootloader's configuration, including the kernel's command-line which 17 determines the store path to use as system environment. 18 19 20## Users and groups {#sec-state-users} 21 22- `/var/lib/nixos` should persist: it holds state needed to generate stable 23 uids and gids for declaratively-managed users and groups, etc. 24- `users.mutableUsers` should be false, *or* the following files under `/etc` 25 should all persist: 26 - {manpage}`passwd(5)` and {manpage}`group(5)`, 27 - {manpage}`shadow(5)` and {manpage}`gshadow(5)`, 28 - {manpage}`subuid(5)` and {manpage}`subgid(5)`.