summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
Diffstat (limited to 'lass')
-rw-r--r--lass/2configs/syncthing.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/lass/2configs/syncthing.nix b/lass/2configs/syncthing.nix
index 48f2625c1..25712f4f3 100644
--- a/lass/2configs/syncthing.nix
+++ b/lass/2configs/syncthing.nix
@@ -1,5 +1,7 @@
{ config, pkgs, ... }: with import <stockholm/lib>; let
- peers = mapAttrs (n: v: { id = v.syncthing.id; }) (filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts);
+ all_peers = filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts;
+ own_peers = filterAttrs (n: v: v.owner.name == "lass") all_peers;
+ mk_peers = mapAttrs (n: v: { id = v.syncthing.id; });
in {
services.syncthing = {
enable = true;
@@ -14,8 +16,8 @@ in {
enable = true;
cert = toString <secrets/syncthing.cert>;
key = toString <secrets/syncthing.key>;
- peers = peers;
- folders."/home/lass/sync".peers = attrNames peers;
+ peers = mk_peers all_peers;
+ folders."/home/lass/sync".peers = attrNames (filterAttrs (n: v: n != "phone") own_peers);
};
system.activationScripts.syncthing-home = ''