aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/lib/utils.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/lib/utils.nix')
-rw-r--r--nixpkgs/nixos/lib/utils.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixpkgs/nixos/lib/utils.nix b/nixpkgs/nixos/lib/utils.nix
index 21f4c7c6988..543c8a8882e 100644
--- a/nixpkgs/nixos/lib/utils.nix
+++ b/nixpkgs/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