summaryrefslogtreecommitdiffstats
path: root/lass/2configs/syncthing.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-04-08 12:33:08 +0200
committerlassulus <lassulus@lassul.us>2020-04-08 12:33:08 +0200
commit0578d851885e59b317d653982b7b74f10739b9f3 (patch)
tree2189e0f2495a67d30d46d38c1d496d228a461436 /lass/2configs/syncthing.nix
parent0a9aa4bc575364ec7a4d477ea98325a8282fde56 (diff)
syncthing: use upstream module
Diffstat (limited to 'lass/2configs/syncthing.nix')
-rw-r--r--lass/2configs/syncthing.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/lass/2configs/syncthing.nix b/lass/2configs/syncthing.nix
index d4df17b9a..5397c2ca6 100644
--- a/lass/2configs/syncthing.nix
+++ b/lass/2configs/syncthing.nix
@@ -7,18 +7,20 @@ in {
enable = true;
group = "syncthing";
configDir = "/var/lib/syncthing";
+ declarative = {
+ key = toString <secrets/syncthing.key>;
+ cert = toString <secrets/syncthing.cert>;
+ devices = mk_peers all_peers;
+ folders."/home/lass/sync" = {
+ devices = attrNames (filterAttrs (n: v: n != "phone") own_peers);
+ # ignorePerms = false;
+ };
+ };
};
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p tcp --dport 22000"; target = "ACCEPT";}
{ predicate = "-p udp --dport 21027"; target = "ACCEPT";}
];
- krebs.syncthing = {
- enable = true;
- cert = toString <secrets/syncthing.cert>;
- key = toString <secrets/syncthing.key>;
- peers = mk_peers all_peers;
- folders."/home/lass/sync".peers = attrNames (filterAttrs (n: v: n != "phone") own_peers);
- };
system.activationScripts.syncthing-home = ''
${pkgs.coreutils}/bin/chmod a+x /home/lass