btrbk: base config for snapshots.
This commit is contained in:
parent
d118957bb5
commit
47800e4173
1 changed files with 26 additions and 0 deletions
26
services/btrbk.nix
Normal file
26
services/btrbk.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue