From 78ab3ef4b4e0352873a46af02c57d415fc99de0e Mon Sep 17 00:00:00 2001 From: notohh Date: Mon, 5 Feb 2024 10:06:22 -0500 Subject: [PATCH] tsuki: add osu backups w/ restic --- hosts/tsuki/hardware.nix | 8 ++++++++ hosts/tsuki/services/restic.nix | 18 +++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/hosts/tsuki/hardware.nix b/hosts/tsuki/hardware.nix index 20dbb2a..32ed5a9 100755 --- a/hosts/tsuki/hardware.nix +++ b/hosts/tsuki/hardware.nix @@ -48,6 +48,14 @@ device = "192.168.1.199:/mnt/Sutoreji/nix-restic-data/tsuki"; fsType = "nfs"; }; + "/nas/ISOS" = { + device = "192.168.1.199:/mnt/Sutoreji/ISOS"; + fsType = "nfs"; + }; + "/nas/osu-backups" = { + device = "192.168.1.199:/mnt/Sutoreji/osu-backups"; + fsType = "nfs"; + }; }; swapDevices = [ diff --git a/hosts/tsuki/services/restic.nix b/hosts/tsuki/services/restic.nix index e3369dd..585a7fe 100644 --- a/hosts/tsuki/services/restic.nix +++ b/hosts/tsuki/services/restic.nix @@ -4,14 +4,13 @@ ... }: { sops.secrets.restic-tsuki = {sopsFile = ../../../secrets/restic/secrets.yaml;}; + sops.secrets.restic-osu = {sopsFile = ../../../secrets/restic/secrets.yaml;}; environment.systemPackages = [pkgs.restic]; services.restic = { backups = { tsuki = { user = "root"; - paths = [ - "/home" - ]; + paths = ["/home"]; exclude = [ "*.qcow2" "*.iso" @@ -46,6 +45,19 @@ Persistent = true; }; }; + osu = { + user = "root"; + paths = ["/home/*/osu!"]; + pruneOpts = ["--keep-last=2"]; + initialize = true; + repository = "/nas/osu-backups"; + passwordFile = config.sops.secrets.restic-osu.path; + timerConfig = { + OnCalendar = "weekly"; + RandomizedDelaySec = "30m"; + Persistent = true; + }; + }; }; }; }