From c10916f47ad6083f0e2b10200b286f25e8858290 Mon Sep 17 00:00:00 2001 From: lightly-toasted Date: Mon, 8 Dec 2025 19:23:05 +0900 Subject: [PATCH] feat(nixos): migrate restic backups from b2 to rest-server --- hosts/nixos/modules/services/restic.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hosts/nixos/modules/services/restic.nix b/hosts/nixos/modules/services/restic.nix index 1452624..85c7215 100644 --- a/hosts/nixos/modules/services/restic.nix +++ b/hosts/nixos/modules/services/restic.nix @@ -6,7 +6,7 @@ "restic/env" = {}; }; - services.restic.backups.b2 = { + services.restic.backups.y2q = { initialize = true; inhibitsSleep = true; passwordFile = config.sops.secrets."restic/password".path; @@ -15,15 +15,16 @@ "/home/toast/workspace" ]; exclude = [ "node_modules" ]; - repository = "s3:https://s3.us-east-005.backblazeb2.com/restic-backups-0"; + repository = "rest:http://y2q:9000/nixos/"; environmentFile = config.sops.secrets."restic/env".path; pruneOpts = [ + "--keep-hourly 6" "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" ]; timerConfig = { - OnCalendar = "daily"; + OnCalendar = "hourly"; Persistent = true; }; };