summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2022-08-20 18:29:07 -0400
committerGitHub <noreply@github.com>2022-08-20 18:29:07 -0400
commit2239c5d55f65be6950facd8910d3eded80e9ee1e (patch)
tree7f1dd4ec897e51c4550b55aa5852c3e0a7b98535 /nixos/modules/system
parentfd58e4570aa184092416e01c200867dc8a36d4f2 (diff)
parent69d79431016fdb8096447f5b5ab0d8e18ffb8f54 (diff)
downloadnixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar.gz
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar.bz2
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar.lz
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar.xz
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.tar.zst
nixpkgs-2239c5d55f65be6950facd8910d3eded80e9ee1e.zip
Merge pull request #186163 from lilyinstarlight/feature/systemd-stage-1-fs-label
nixos/systemd-stage-1: unify initrd fstab generation logic with system fstab
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/systemd/initrd.nix8
1 files changed, 0 insertions, 8 deletions
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix
index 888653469ed..8b3bbfdd249 100644
--- a/nixos/modules/system/boot/systemd/initrd.nix
+++ b/nixos/modules/system/boot/systemd/initrd.nix
@@ -100,12 +100,6 @@ let
 
   fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems;
 
-  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";
-        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;
 
@@ -354,8 +348,6 @@ in {
           DefaultEnvironment=PATH=/bin:/sbin ${optionalString (isBool cfg.emergencyAccess && cfg.emergencyAccess) "SYSTEMD_SULOGIN_FORCE=1"}
         '';
 
-        "/etc/fstab".source = fstab;
-
         "/lib/modules".source = "${modulesClosure}/lib/modules";
         "/lib/firmware".source = "${modulesClosure}/lib/firmware";