nixos/stage-1-systemd: makeFstabEntries: drop rootPrefix parameter

This commit is contained in:
Nick Cao 2023-09-27 18:31:05 -04:00
parent 0fecd7edc8
commit 37cac5f032
No known key found for this signature in database

View file

@ -187,7 +187,7 @@ let
skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck || isBindMount fs; skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck || isBindMount fs;
# https://wiki.archlinux.org/index.php/fstab#Filepath_spaces # https://wiki.archlinux.org/index.php/fstab#Filepath_spaces
escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string; escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string;
in fstabFileSystems: { rootPrefix ? "" }: concatMapStrings (fs: in fstabFileSystems: { }: concatMapStrings (fs:
(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 if fs.label != null then "/dev/disk/by-label/${escape fs.label}"
else throw "No device specified for mount point ${fs.mountPoint}.") else throw "No device specified for mount point ${fs.mountPoint}.")
@ -198,9 +198,7 @@ let
+ "\n" + "\n"
) fstabFileSystems; ) fstabFileSystems;
initrdFstab = pkgs.writeText "initrd-fstab" (makeFstabEntries (filter utils.fsNeededForBoot fileSystems) { initrdFstab = pkgs.writeText "initrd-fstab" (makeFstabEntries (filter utils.fsNeededForBoot fileSystems) { });
rootPrefix = "/sysroot";
});
in in