about summary refs log tree commit diff
path: root/nixos/lib/utils.nix
diff options
context:
space:
mode:
authorV <v@anomalous.eu>2021-02-09 18:06:58 +0100
committerV <v@anomalous.eu>2021-02-11 22:59:05 +0100
commitededd308a83218db2e69bb3a94df79414c30eb6d (patch)
treeb62df5884b6493e67824916872f65d25b48921e4 /nixos/lib/utils.nix
parent26fa07898578070730cdb9062387abf69815dbe2 (diff)
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.
Diffstat (limited to 'nixos/lib/utils.nix')
-rw-r--r--nixos/lib/utils.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix
index c9dfdbed99a36..9c8294b20e5d7 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