summaryrefslogtreecommitdiffstats
path: root/lass/2configs/syncthing.nix
diff options
context:
space:
mode:
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 d4df17b9..5397c2ca 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