2024-07-29 15:39:54 +03:00
|
|
|
{ config, lib, ... }:
|
2023-07-26 13:58:42 +03:00
|
|
|
{
|
|
|
|
options.mj.base.zfs = with lib.types; {
|
|
|
|
enable = lib.mkEnableOption "Enable common zfs options";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf config.mj.base.zfs.enable {
|
2024-02-04 16:18:47 +02:00
|
|
|
# TODO
|
|
|
|
#services.zfs = assert lib.assertMsg (config.mj.base.unitstatus.enable "mj.base.unitstatus must be enabled"; {
|
|
|
|
services.zfs = {
|
2023-07-26 13:58:42 +03:00
|
|
|
autoScrub.enable = true;
|
|
|
|
trim.enable = true;
|
|
|
|
expandOnBoot = "all";
|
|
|
|
};
|
|
|
|
|
2024-07-29 15:39:54 +03:00
|
|
|
mj.base.unitstatus.units = [ "zfs-scrub" ];
|
2023-07-26 13:58:42 +03:00
|
|
|
};
|
|
|
|
}
|