1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8let
9
10 inInitrd = config.boot.initrd.supportedFilesystems.erofs or false;
11 inSystem = config.boot.supportedFilesystems.erofs or false;
12
13in
14
15{
16 config = lib.mkIf (inInitrd || inSystem) {
17
18 system.fsPackages = [ pkgs.erofs-utils ];
19
20 boot.initrd.availableKernelModules = lib.mkIf inInitrd [ "erofs" ];
21
22 # fsck.erofs is currently experimental and should not be run as a
23 # privileged user. Thus, it is not included in the initrd.
24
25 };
26}