From ededd308a83218db2e69bb3a94df79414c30eb6d Mon Sep 17 00:00:00 2001 From: V Date: Tue, 9 Feb 2021 18:06:58 +0100 Subject: 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. --- nixos/lib/utils.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index c9dfdbed99a..9c8294b20e5 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -10,7 +10,7 @@ rec { # Check whenever fileSystem is needed for boot. NOTE: Make sure # pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c # is in the list, put /a and /a/b in as well. - pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ]; + pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/var/lib/nixos" "/etc" ]; fsNeededForBoot = fs: fs.neededForBoot || elem fs.mountPoint pathsNeededForBoot; # Check whenever `b` depends on `a` as a fileSystem -- cgit 1.4.1