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