diff --git a/machines/morpheus.nix b/machines/morpheus.nix index 6dd13bf..582814a 100644 --- a/machines/morpheus.nix +++ b/machines/morpheus.nix @@ -15,6 +15,7 @@ inputs.nixpkgs.lib.nixosSystem { nixpkgs.overlays = [ overlay-unstable ]; }) (import ./common.nix inputs) + (import ./morpheus/btrbk.nix inputs) (import ./dev.nix inputs) (import ./entertainment.nix inputs) (import ./office.nix inputs) diff --git a/machines/morpheus/btrbk.nix b/machines/morpheus/btrbk.nix new file mode 100644 index 0000000..358728b --- /dev/null +++ b/machines/morpheus/btrbk.nix @@ -0,0 +1,25 @@ +{ ... }: { + services.btrbk = { + instances = { + home = { + settings = { + snapshot_preserve = "24h 14d 4w 12m"; + snapshot_preserve_min = "latest"; + + /* don't auto cleanup target */ + target_preserve_min = "all"; + + volume."/" = { + snapshot_dir = ".btrbk"; + subvolume = { + home = { + snapshot_create = "always"; + }; + }; + target = "/run/media/me/backup/morpheus"; + }; + }; + }; + }; + }; +}