2022-02-10 20:34:41 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
inInitrd = config.boot.initrd.supportedFilesystems.apfs or false;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2024-02-29 20:09:43 +00:00
|
|
|
config = mkIf (config.boot.supportedFilesystems.apfs or false) {
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
system.fsPackages = [ pkgs.apfsprogs ];
|
|
|
|
|
|
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.apfs ];
|
|
|
|
|
|
|
|
boot.initrd.kernelModules = mkIf inInitrd [ "apfs" ];
|
|
|
|
|
|
|
|
# Don't copy apfsck into the initramfs since it does not support repairing the filesystem
|
|
|
|
};
|
|
|
|
}
|