From e471b578838f1564a2248dbddb633c0ac6306c71 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Fri, 21 Feb 2025 01:45:12 +0100 Subject: [PATCH] take restic backups --- hosts/ayanami/configuration.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/hosts/ayanami/configuration.nix b/hosts/ayanami/configuration.nix index 3ab8402..d075d42 100644 --- a/hosts/ayanami/configuration.nix +++ b/hosts/ayanami/configuration.nix @@ -14,6 +14,38 @@ # "10.10.111.103" = [ "snowbell.htb" "legacy.snowbell.htb" "management.snowbell.htb" ]; }; + services.restic.backups."main" = { + repositoryFile = "/root/restic-main-repo"; + passwordFile = "/root/restic-main-password"; + pruneOpts = [ + "--keep-last 2" + "--keep-within 3d" + "--keep-daily 7" + "--keep-weekly 5" + "--keep-monthly 12" + "--keep-yearly 5" + ]; + paths = [ + "/home/daniel" + "/var/lib" + ]; + exclude = [ + "/home/*/.cache" + + "/home/*/.local/share/Trash" + + "/home/*/.cargo" + + "/home/*/.local/share/Steam/*" + "!/home/*/.local/share/Steam/compatdata" + + "/home/*/mnt" + ]; + extraBackupArgs = [ + "--one-file-system" + ]; + }; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; virtualisation.podman.enable = true;