From 5a57cde1105ddfaa1f24d5661f74adbd8787ce6d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 19 Dec 2023 08:38:03 +0200 Subject: [PATCH] nixos/systemd/initrd: add systemd-makefs unconditionally As discussed in https://github.com/NixOS/nixpkgs/issues/274310#issuecomment-1861842634, the size increase is negligible, and this might be triggered via fstab options or the cmdline too. systemd-growfs is an online operation, so it's taken care of in stage 2. Fixes https://github.com/NixOS/nixpkgs/issues/274310. --- nixos/modules/system/boot/systemd/initrd.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 0e7d59b32075..d7e8a67c4bc9 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -90,8 +90,6 @@ let fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems; - needMakefs = lib.any (fs: fs.autoFormat) fileSystems; - kernel-name = config.boot.kernelPackages.kernel.name or "kernel"; modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; }; firmware = config.hardware.firmware; @@ -430,7 +428,7 @@ in { "${cfg.package}/lib/systemd/systemd-fsck" "${cfg.package}/lib/systemd/systemd-hibernate-resume" "${cfg.package}/lib/systemd/systemd-journald" - (lib.mkIf needMakefs "${cfg.package}/lib/systemd/systemd-makefs") + "${cfg.package}/lib/systemd/systemd-makefs" "${cfg.package}/lib/systemd/systemd-modules-load" "${cfg.package}/lib/systemd/systemd-remount-fs" "${cfg.package}/lib/systemd/systemd-shutdown"