diff --git a/services/btrbk.nix b/services/btrbk.nix new file mode 100644 index 0000000..70fb7dc --- /dev/null +++ b/services/btrbk.nix @@ -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"; + }; + }; + }; + }; + }; +}