diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 91e30aa4c0af9..49f02e88efbbe 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -193,7 +193,10 @@ let else throw "No device specified for mount point ‘${fs.mountPoint}’.") + " " + escape fs.mountPoint + " " + fs.fsType - + " " + escape (builtins.concatStringsSep "," fs.options) + + " " + escape (builtins.concatStringsSep "," ( + fs.options ++ + map (path: "x-systemd.requires-mounts-for=${path}") fs.depends + )) + " 0 " + (if skipCheck fs then "0" else if fs.mountPoint == "/" then "1" else "2") + "\n" ) fstabFileSystems;