mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
syncthing: Only sync folders with the right peers
This commit is contained in:
parent
61869b5575
commit
f6fd5bb49e
1 changed files with 6 additions and 3 deletions
|
|
@ -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 = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue