diff --git a/backup.nix b/backup.nix index c3b942a..f9f8af6 100644 --- a/backup.nix +++ b/backup.nix @@ -1,4 +1,19 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { - environment.systemPackages = [pkgs.backblaze-b2]; + environment.systemPackages = [pkgs.restic]; + + services.restic.backups = { + b2 = { + initialize = true; + environmentFile = "/etc/restic-env"; + repository = "b2:marauder-backup"; + passwordFile = "/etc/restic-password"; + paths = [config.users.users.nettika.home]; + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 5" + "--keep-monthly 12" + ]; + }; + }; }