git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/boot: add /var/lib/nixos to pathsNeededForBoot

/var/lib/nixos is used by update-users-groups.pl in the activation script for storing uid/gid mappings. If this has its own mountpoint (as is the case in some setups with fine-grained bind mounts pointing into persistent storage), the mappings are written to /var/lib, /var, or /. These may be backed by a tmpfs or (otherwise ephemeral storage), resulting in the mappings not persisting between reboots.

commitededd308a83218db2e69bb3a94df79414c30eb6d authorV <v@anomalous.eu> dateTue 9 Feb 2021, 18:06 (6 years ago) parent26fa078
1 file changed+1−1
nixos/lib/utils.nix+1−1
nixos/lib/utils.nix+1−1
@@ -10,7 +10,7 @@ rec {
1010 # Check whenever fileSystem is needed for boot. NOTE: Make sure
1111 # pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c
1212 # is in the list, put /a and /a/b in as well.
13− pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ];
13+ pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/var/lib/nixos" "/etc" ];
1414 fsNeededForBoot = fs: fs.neededForBoot || elem fs.mountPoint pathsNeededForBoot;
1515
1616 # Check whenever `b` depends on `a` as a fileSystem