From 5e02f195835646259d5001da78e8aae9477ea5d4 Mon Sep 17 00:00:00 2001 From: wi11-holdsworth <83637728+wi11-holdsworth@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:47:04 +1000 Subject: [PATCH] refactor: backup syncthing --- modules/nixos/features/syncthing.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/nixos/features/syncthing.nix b/modules/nixos/features/syncthing.nix index 47612b5..4f74eea 100644 --- a/modules/nixos/features/syncthing.nix +++ b/modules/nixos/features/syncthing.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, userName, hostName, ... @@ -62,6 +63,27 @@ in }; }; + # backup + borgbackup.jobs = + # we only need one syncthing host to be backed up + # choose server because borgbackup is the most fleshed out + # on srv currently + if userName == "srv" then + import ../backup.nix feature + { + paths = [ + "/home/srv/.config/syncthing" + "/home/srv/Sync" + ]; + } + { + inherit config; + inherit lib; + inherit pkgs; + } + else + null; + # reverse proxy nginx = { virtualHosts."${feature}.fi33.buzz" = {