diff options
Diffstat (limited to 'nixos/lib/utils.nix')
-rw-r--r-- | nixos/lib/utils.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 21f4c7c6988ff..543c8a8882ea6 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -2,9 +2,11 @@ pkgs: with pkgs.lib; rec { - # Check whenever fileSystem is needed for boot - fsNeededForBoot = fs: fs.neededForBoot - || elem fs.mountPoint [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/etc" ]; + # 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" ]; + fsNeededForBoot = fs: fs.neededForBoot || elem fs.mountPoint pathsNeededForBoot; # Check whenever `b` depends on `a` as a fileSystem fsBefore = a: b: a.mountPoint == b.device |