l syncthing: don't share sync with phone
This commit is contained in:
parent
65c2a88248
commit
b216553984
@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, ... }: with import <stockholm/lib>; let
|
{ 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 {
|
in {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -14,8 +16,8 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
cert = toString <secrets/syncthing.cert>;
|
cert = toString <secrets/syncthing.cert>;
|
||||||
key = toString <secrets/syncthing.key>;
|
key = toString <secrets/syncthing.key>;
|
||||||
peers = peers;
|
peers = mk_peers all_peers;
|
||||||
folders."/home/lass/sync".peers = attrNames peers;
|
folders."/home/lass/sync".peers = attrNames (filterAttrs (n: v: n != "phone") own_peers);
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.syncthing-home = ''
|
system.activationScripts.syncthing-home = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user