From 8fb5147d22e86c5b19e746477f347873e1fcd6e6 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 10 Feb 2026 19:41:12 +0100 Subject: [PATCH] add borg backup to vps --- hosts/nixos/vps/system.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hosts/nixos/vps/system.nix b/hosts/nixos/vps/system.nix index 9264ef2..efd6673 100644 --- a/hosts/nixos/vps/system.nix +++ b/hosts/nixos/vps/system.nix @@ -9,6 +9,7 @@ ../../../modules/tailscale.nix ../../../modules/podman.nix ../../../modules/traefik.nix + ../../../modules/borg/client.nix ]; # GRUB bootloader with UEFI support @@ -71,4 +72,20 @@ services.tailscale-custom.exitNode = true; + # Borg backup configuration + services.borg-client-custom = { + enable = false; + repositoryUrl = "ssh://borg-box/./vps"; + backupPaths = [ + "/var/lib/mongodb" + ]; + backupFrequency = "*-*-* 03:00:00"; + retention = { + keepDaily = 7; + keepWeekly = 4; + keepMonthly = 6; + keepYearly = 2; + }; + }; + }