at 23.11-pre 480 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 7 inInitrd = any (fs: fs == "apfs") config.boot.initrd.supportedFilesystems; 8 9in 10 11{ 12 config = mkIf (any (fs: fs == "apfs") config.boot.supportedFilesystems) { 13 14 system.fsPackages = [ pkgs.apfsprogs ]; 15 16 boot.extraModulePackages = [ config.boot.kernelPackages.apfs ]; 17 18 boot.initrd.kernelModules = mkIf inInitrd [ "apfs" ]; 19 20 # Don't copy apfsck into the initramfs since it does not support repairing the filesystem 21 }; 22}