From f6fd5bb49ea2de6c393885fa267a1d1a9500316c Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sun, 8 Feb 2026 01:27:55 +0100 Subject: [PATCH] syncthing: Only sync folders with the right peers --- modules/system/services/syncthing.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/system/services/syncthing.nix b/modules/system/services/syncthing.nix index c9320cd..a745d10 100644 --- a/modules/system/services/syncthing.nix +++ b/modules/system/services/syncthing.nix @@ -103,9 +103,12 @@ in folders = cfg.folders - |> self.lib.genAttrs (name: { - path = "${dataDir}/${name}"; - devices = hosts |> lib.attrNames; + |> self.lib.genAttrs (folder: { + path = "${dataDir}/${folder}"; + devices = + hosts + |> lib.filterAttrs (_: host: host.config.custom.services.syncthing.folders |> lib.elem folder) + |> lib.attrNames; }); options = {