btrbk: base config for snapshots.

This commit is contained in:
Kevin Baensch 2024-12-21 21:18:16 +01:00
parent d118957bb5
commit 47800e4173
Signed by: derped
GPG key ID: C0F1D326C7626543

26
services/btrbk.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
lib,
...
}:
with lib;
mkIf (elem "btrbk" config.machine.services) {
services.btrbk.instances = {
"persist" = {
onCalendar = "hourly";
settings = {
timestamp_format = "long";
snapshot_preserve_min = "1w";
volume = {
"/" = {
snapshot_preserve = "20d 10w *m";
snapshot_dir = "/snapshots";
subvolume = "/persist";
};
};
};
};
};
}