nixos/roles/zfs.nix
2024-12-18 18:19:37 -06:00

28 lines
460 B
Nix

{
services.zfs.autoScrub.enable = true;
services.sanoid = {
enable = true;
templates.backup = {
hourly = 36;
daily = 30;
monthly = 12;
yearly = 1;
autoprune = true;
autosnap = true;
};
datasets."zpool/root" = {
useTemplate = [ "backup" ];
};
datasets."zpool/home" = {
useTemplate = [ "backup" ];
};
datasets."zpool/var" = {
useTemplate = [ "backup" ];
};
};
}