about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-21 17:40:49 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-21 17:40:49 -0700
commit8120b0413198c57eece2e2225ce93b4b921238b7 (patch)
tree35a76d3ebd52be8b4117595eac304853eaf23eb5 /modules/services
parentmail: fix tags for notmuch (diff)
downloadworld-8120b0413198c57eece2e2225ce93b4b921238b7.tar.gz
modules: add syncthing as a new module
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/default.nix1
-rw-r--r--modules/services/syncthing/default.nix11
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/services/default.nix b/modules/services/default.nix
index 693872f..88d8145 100644
--- a/modules/services/default.nix
+++ b/modules/services/default.nix
@@ -16,6 +16,7 @@
     ./rclone
     ./samba
     ./ssh-server
+    ./syncthing
     ./tailscale
     ./thermald
     ./tlp
diff --git a/modules/services/syncthing/default.nix b/modules/services/syncthing/default.nix
new file mode 100644
index 0000000..3b6f34f
--- /dev/null
+++ b/modules/services/syncthing/default.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, lib, ... }:
+let cfg = config.my.services.syncthing;
+in {
+  services.syncthing = {
+    enable = true;
+    openDefaultPorts = true;
+    user = config.users.users.fcuny;
+    group = "users";
+    dataDir = "${config.users.users.fcuny.home}/.syncthing";
+  };
+}