diff --git a/hosts/unstable/hosea/default.nix b/hosts/unstable/hosea/default.nix index 537be9c..d84aa92 100644 --- a/hosts/unstable/hosea/default.nix +++ b/hosts/unstable/hosea/default.nix @@ -145,6 +145,24 @@ in }; }; prometheus.exporters.graphite.enable = true; + restic.backups.albyhub = { + # AlbyHub LDK node data — must not be snapshotted live + paths = [ "/chain/alby" ]; + environmentFile = config.age.secrets.restic-env.path; + passwordFile = config.age.secrets.restic-pw.path; + initialize = true; + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 4" + "--keep-monthly 12" + ]; + backupPrepareCommand = "systemctl stop albyhub || true"; + backupCleanupCommand = "systemctl start albyhub"; + timerConfig = { + OnCalendar = "02:30"; + RandomizedDelaySec = "30min"; + }; + }; # Configure keymap xserver.xkb = { layout = "us"; @@ -158,6 +176,12 @@ in file = ../../../secrets/grafana-api-token.age; owner = "grafana"; }; + age.secrets.restic-pw = { + file = ../../../secrets/restic-pw.age; + }; + age.secrets.restic-env = { + file = ../../../secrets/restic-env.age; + }; environment.etc = { "grafana-dashboards/system-health.json".text = ''