2024-02-12 14:57:13 +01:00
|
|
|
{ config, ... }: {
|
|
|
|
imports = [ ./msmtp.nix ];
|
|
|
|
|
|
|
|
# {{{ Zfs config
|
|
|
|
services.zfs = {
|
|
|
|
trim.enable = true;
|
|
|
|
autoScrub.enable = true;
|
|
|
|
|
2024-02-12 15:05:07 +01:00
|
|
|
# zed.enableMail = true;
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
# {{{ Sanoid config
|
|
|
|
# Sanoid allows me to configure snapshot frequency on a per-dataset basis.
|
|
|
|
services.sanoid = {
|
|
|
|
enable = true;
|
2024-02-12 14:57:13 +01:00
|
|
|
|
2024-02-12 15:05:07 +01:00
|
|
|
# {{{ Data
|
|
|
|
datasets.data = {
|
|
|
|
autosnap = true;
|
|
|
|
autoprune = true;
|
|
|
|
recursive = true;
|
|
|
|
yearly = 0;
|
|
|
|
monthly = 12;
|
|
|
|
weekly = 4;
|
|
|
|
daily = 7;
|
|
|
|
hourly = 24;
|
2024-02-12 14:57:13 +01:00
|
|
|
};
|
2024-02-12 15:05:07 +01:00
|
|
|
# }}}
|
|
|
|
# {{{ State
|
|
|
|
datasets.state = {
|
|
|
|
autosnap = true;
|
|
|
|
autoprune = true;
|
|
|
|
recursive = true;
|
|
|
|
yearly = 0;
|
|
|
|
monthly = 1;
|
|
|
|
weekly = 1;
|
|
|
|
daily = 3;
|
|
|
|
hourly = 6;
|
|
|
|
};
|
|
|
|
# }}}
|
2024-02-12 14:57:13 +01:00
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
# {{{ Zed email config
|
2024-02-12 15:05:07 +01:00
|
|
|
# Zed allows using email notifications for events
|
2024-02-12 14:57:13 +01:00
|
|
|
sops.secrets.zed_smtp_pass.sopsFile = ../secrets.yaml;
|
|
|
|
programs.msmtp.accounts.zed = {
|
|
|
|
from = "zed@orbit.moonythm.dev";
|
|
|
|
user = "zed@orbit.moonythm.dev";
|
|
|
|
passwordeval = "cat ${config.sops.secrets.zed_smtp_pass.path}";
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
}
|