summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2022-11-20 22:27:28 -0500
committerWill Fancher <elvishjerricco@gmail.com>2022-11-20 22:30:01 -0500
commit71c74bf1738d306fff289f8d48f82313e2c100f4 (patch)
tree03f16d8b1aad12996f58685612160903637fe9ac /nixos
parent23b3add0e305ec447ba19613be723e781522e7f9 (diff)
nixos: Add ext to fsPackages in stage 2 with systemd-initrd enabled
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/tasks/filesystems/ext.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/ext.nix b/nixos/modules/tasks/filesystems/ext.nix
index 9b61f21643aba..edc0efc552136 100644
--- a/nixos/modules/tasks/filesystems/ext.nix
+++ b/nixos/modules/tasks/filesystems/ext.nix
@@ -3,13 +3,14 @@
 let
 
   inInitrd = lib.any (fs: fs == "ext2" || fs == "ext3" || fs == "ext4") config.boot.initrd.supportedFilesystems;
+  inSystem = lib.any (fs: fs == "ext2" || fs == "ext3" || fs == "ext4") config.boot.supportedFilesystems;
 
 in
 
 {
   config = {
 
-    system.fsPackages = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ pkgs.e2fsprogs ];
+    system.fsPackages = lib.mkIf (config.boot.initrd.systemd.enable -> (inInitrd || inSystem)) [ pkgs.e2fsprogs ];
 
     # As of kernel 4.3, there is no separate ext3 driver (they're also handled by ext4.ko)
     boot.initrd.availableKernelModules = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ "ext2" "ext4" ];