summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-04-07 15:27:52 +0200
committerAlex Auvolat <alex@adnab.me>2024-04-07 15:27:52 +0200
commit77d298b4a4bfbe2fd69d368b714d103c1dc7de2f (patch)
tree2748ea8e15f9519faa9f82de8ddf3f7cf61b9987 /nixos
parent3245786875910992688f9cb7a1c5d02dd34c9323 (diff)
downloaduser-config-77d298b4a4bfbe2fd69d368b714d103c1dc7de2f.tar.gz
user-config-77d298b4a4bfbe2fd69d368b714d103c1dc7de2f.zip
add restic kusanagi
Diffstat (limited to 'nixos')
-rw-r--r--nixos/kusanagi.nix26
1 files changed, 26 insertions, 0 deletions
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";