From 77d298b4a4bfbe2fd69d368b714d103c1dc7de2f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 7 Apr 2024 15:27:52 +0200 Subject: add restic kusanagi --- nixos/kusanagi.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'nixos') diff --git a/nixos/kusanagi.nix b/nixos/kusanagi.nix index 1792548..88e3b66 100644 --- a/nixos/kusanagi.nix +++ b/nixos/kusanagi.nix @@ -143,6 +143,32 @@ in virtualisation.docker.enable = true; virtualisation.virtualbox.host.enable = true; + # ---- remote backup (restic to infracoll) + + services.restic.backups."infracoll" = { + repository = "s3:http://garage.isomorphis.me:3900/restic-lx"; + environmentFile = "/persist/etc/secrets/restic/infracoll/credentials"; + passwordFile = "/persist/etc/secrets/restic/infracoll/password"; + paths = [ + "/persist" + "/Z/lx" + ]; + exclude = [ + "/persist/var/log" + "/Z/lx/oneplus5/Camera" # for now + ]; + timerConfig = { + OnCalendar = "21:30"; + Persistent = true; + }; + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 5" + "--keep-monthly 12" + "--keep-yearly 75" + ]; + }; + # ---- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -- cgit v1.2.3