summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-03-22 08:07:04 +0100
committerlassulus <lassulus@lassul.us>2019-03-22 08:07:52 +0100
commit96fc1908a2488fd4ccedfea7b6bdf64425de2e83 (patch)
tree274e50248fdec8cebb464a1b33a21dfeafe7b4a9 /lass/2configs
parent90ab9c288e0baa6f2e7f7b2e7cdffd10bda89938 (diff)
l syncthing: use module
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/syncthing.nix9
-rw-r--r--lass/2configs/tests/dummy-secrets/syncthing.cert0
-rw-r--r--lass/2configs/tests/dummy-secrets/syncthing.key0
3 files changed, 9 insertions, 0 deletions
diff --git a/lass/2configs/syncthing.nix b/lass/2configs/syncthing.nix
index 17debf822..164e89679 100644
--- a/lass/2configs/syncthing.nix
+++ b/lass/2configs/syncthing.nix
@@ -8,4 +8,13 @@ with import <stockholm/lib>;
{ 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 = mapAttrs (n: v: { id = v.syncthing.id; }) (filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts);
+ folders = [
+ { path = "/tmp/testsync"; peers = [ "icarus" "mors" "skynet" ]; }
+ ];
+ };
}
diff --git a/lass/2configs/tests/dummy-secrets/syncthing.cert b/lass/2configs/tests/dummy-secrets/syncthing.cert
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/lass/2configs/tests/dummy-secrets/syncthing.cert
diff --git a/lass/2configs/tests/dummy-secrets/syncthing.key b/lass/2configs/tests/dummy-secrets/syncthing.key
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/lass/2configs/tests/dummy-secrets/syncthing.key