Commit 4c13c933 authored by MidAutumnMoon's avatar MidAutumnMoon Committed by github-actions[bot]
Browse files

nixos/zram-as-tmp: fix boot failure caused by e2fsprogs not available

This module made the assumption that `e2fsprogs` will always be
available in `system.fsPackages`, whereas on my system with tmpfs as
root+btrfs setup, e2fsprogs is not added to `fsPackages`, causing zram-generator
failed to find mkfs.ext4.

Related log:

```
systemd-makefs[555]: mkfs binary for ext4 is not available.
```

(cherry picked from commit fb093b46)
parent 726f7404
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -85,6 +85,10 @@ in
      }
    ];

    boot.supportedFilesystems = {
      ${cfg.zramSettings.fs-type} = true;
    };

    services.zram-generator.enable = true;
    services.zram-generator.settings =
      let