diff options
author | Nick Cao <nickcao@nichi.co> | 2023-09-27 14:33:21 -0400 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-09-27 14:34:17 -0400 |
commit | 0fecd7edc884b5f397cb44fcaff88d52c34f3696 (patch) | |
tree | 9a9e73d51bf771505c6c41d0e94382c0f011992d /nixos | |
parent | 8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2 (diff) | |
download | nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar.gz nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar.bz2 nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar.lz nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar.xz nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.tar.zst nixlib-0fecd7edc884b5f397cb44fcaff88d52c34f3696.zip |
nixos/stage-1-systemd: fix initrd-fstab generation for bind mounts, again
See https://github.com/NixOS/nixpkgs/pull/185089
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/tasks/filesystems.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 7cb2ca23fa41..3f553948d78d 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -188,8 +188,7 @@ let # https://wiki.archlinux.org/index.php/fstab#Filepath_spaces escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string; in fstabFileSystems: { rootPrefix ? "" }: concatMapStrings (fs: - (optionalString (isBindMount fs) (escape rootPrefix)) - + (if fs.device != null then escape fs.device + (if fs.device != null then escape fs.device else if fs.label != null then "/dev/disk/by-label/${escape fs.label}" else throw "No device specified for mount point ‘${fs.mountPoint}’.") + " " + escape fs.mountPoint |