Merge pull request #185089 from NickCao/bind
nixos/stage-1-systemd: fix initrd-fstab generation for bind mounts
This commit is contained in:
commit
5b3a9a815d
1 changed files with 2 additions and 1 deletions
|
@ -103,7 +103,8 @@ let
|
|||
fstab = pkgs.writeText "initrd-fstab" (lib.concatMapStringsSep "\n"
|
||||
({ fsType, mountPoint, device, options, autoFormat, autoResize, ... }@fs: let
|
||||
opts = options ++ optional autoFormat "x-systemd.makefs" ++ optional autoResize "x-systemd.growfs";
|
||||
in "${device} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," opts}") fileSystems);
|
||||
finalDevice = if (lib.elem "bind" options) then "/sysroot${device}" else device;
|
||||
in "${finalDevice} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," opts}") fileSystems);
|
||||
|
||||
needMakefs = lib.any (fs: fs.autoFormat) fileSystems;
|
||||
needGrowfs = lib.any (fs: fs.autoResize) fileSystems;
|
||||
|
|
Loading…
Reference in a new issue