From f05869f2bb112e44be980a1fde1d15f4c436b11a Mon Sep 17 00:00:00 2001 From: glenn Date: Tue, 25 Jun 2024 15:22:17 +0200 Subject: [PATCH] backup vaultwarden --- vaultwarden.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vaultwarden.nix b/vaultwarden.nix index 104f1f7..99b9ba9 100644 --- a/vaultwarden.nix +++ b/vaultwarden.nix @@ -11,6 +11,24 @@ in }; + services.restic.backups = { + "vaultwarden" = { + passwordFile = "/etc/nixos/.secrets/restic_pw"; + repository = "sftp:Glenn@nas:/home/back/vaultwarden/restic"; + initialize = true; + paths = [ + "/var/lib/bitwarden_rs" + ]; + user = "sondell"; + timerConfig.OnCalendar = "02:05"; + pruneOpts = [ + "--keep-daily 10" + "--keep-weekly 5" + "--keep-monthly 12" + "--keep-yearly 75" + ]; + }; + }; services.nginx.virtualHosts.${domain} = { forceSSL = true; enableACME = true;