syncthing: Only sync folders with the right peers

This commit is contained in:
SebastianStork 2026-02-08 01:27:55 +01:00
parent 61869b5575
commit f6fd5bb49e
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -103,9 +103,12 @@ in
folders = folders =
cfg.folders cfg.folders
|> self.lib.genAttrs (name: { |> self.lib.genAttrs (folder: {
path = "${dataDir}/${name}"; path = "${dataDir}/${folder}";
devices = hosts |> lib.attrNames; devices =
hosts
|> lib.filterAttrs (_: host: host.config.custom.services.syncthing.folders |> lib.elem folder)
|> lib.attrNames;
}); });
options = { options = {