Switch out zfs.autoSnapshot
for sanoid
This commit is contained in:
parent
0ed5de744c
commit
86c2d63cc1
|
@ -5,18 +5,44 @@
|
||||||
services.zfs = {
|
services.zfs = {
|
||||||
trim.enable = true;
|
trim.enable = true;
|
||||||
autoScrub.enable = true;
|
autoScrub.enable = true;
|
||||||
|
autoSnapshot = false; # We will configure this using sanoid
|
||||||
autoSnapshot = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# -k -p is the default, and --utc is there to prevent timezone-related issues
|
|
||||||
autoSnapshot.flags = "-k -p --utc";
|
|
||||||
};
|
|
||||||
|
|
||||||
# zed.enableMail = true;
|
# zed.enableMail = true;
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ Sanoid config
|
||||||
|
# Sanoid allows me to configure snapshot frequency on a per-dataset basis.
|
||||||
|
services.sanoid = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# {{{ Data
|
||||||
|
datasets.data = {
|
||||||
|
autosnap = true;
|
||||||
|
autoprune = true;
|
||||||
|
recursive = true;
|
||||||
|
yearly = 0;
|
||||||
|
monthly = 12;
|
||||||
|
weekly = 4;
|
||||||
|
daily = 7;
|
||||||
|
hourly = 24;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
# {{{ State
|
||||||
|
datasets.state = {
|
||||||
|
autosnap = true;
|
||||||
|
autoprune = true;
|
||||||
|
recursive = true;
|
||||||
|
yearly = 0;
|
||||||
|
monthly = 1;
|
||||||
|
weekly = 1;
|
||||||
|
daily = 3;
|
||||||
|
hourly = 6;
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
# {{{ Zed email config
|
# {{{ Zed email config
|
||||||
|
# Zed allows using email notifications for events
|
||||||
sops.secrets.zed_smtp_pass.sopsFile = ../secrets.yaml;
|
sops.secrets.zed_smtp_pass.sopsFile = ../secrets.yaml;
|
||||||
programs.msmtp.accounts.zed = {
|
programs.msmtp.accounts.zed = {
|
||||||
from = "zed@orbit.moonythm.dev";
|
from = "zed@orbit.moonythm.dev";
|
||||||
|
|
Loading…
Reference in a new issue