nixos-config/system/zfs.nix
Christoph Heiss 5bc7793319
system: zfs: lower scrub interval to monthly
Best would be bi-weekly, but systemd does not support such an interval
(yet).

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-06-03 18:16:28 +02:00

30 lines
637 B
Nix

{ config, my, pkgs, ... }:
{
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.supportedFilesystems = [ "zfs" ];
boot.initrd.supportedFilesystems = [ "zfs" ];
environment.systemPackages = with pkgs; [ zfs ];
services.zfs = {
autoScrub = {
enable = true;
interval = "monthly";
};
autoSnapshot = {
enable = true;
frequent = 4;
hourly = 24;
daily = 14;
weekly = 8;
monthly = 12;
};
trim.enable = true;
zed.settings = {
ZED_SLACK_WEBHOOK_URL = my.notifications.zfs-bot.url;
ZED_NOTIFY_VERBOSE = 1;
};
};
}