summaryrefslogtreecommitdiffstats
path: root/lass/2configs/syncthing.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-05-29 15:47:34 +0200
committerlassulus <lassulus@lassul.us>2019-05-29 15:54:14 +0200
commitb216553984b5b3fadb297bdf2f8f019daa1c957b (patch)
tree6c6a5ad0067f19489f98a0aafaca88c89d08fe07 /lass/2configs/syncthing.nix
parent65c2a882482a8c9ceeebff68dc38be83ab44ee12 (diff)
l syncthing: don't share sync with phone
Diffstat (limited to 'lass/2configs/syncthing.nix')
-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 = ''