about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-21 17:47:57 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-21 17:47:57 -0700
commit667ae0969d82c8c79a27ba4c043918ddffbd5de2 (patch)
tree76432829ae60c346c96b061bffe1810c1090f759
parentmodules: add syncthing as a new module (diff)
downloadworld-667ae0969d82c8c79a27ba4c043918ddffbd5de2.tar.gz
syncthing: let's run it from home-manager
Diffstat (limited to '')
-rw-r--r--home/syncthing/default.nix14
-rw-r--r--hosts/tahoe/home.nix1
2 files changed, 15 insertions, 0 deletions
diff --git a/home/syncthing/default.nix b/home/syncthing/default.nix
new file mode 100644
index 0000000..4e8e4f3
--- /dev/null
+++ b/home/syncthing/default.nix
@@ -0,0 +1,14 @@
+{ lib, config, pkgs, ... }:
+let cfg = config.my.home.syncthing;
+in {
+  options.my.home.syncthing = with lib; {
+    enable = mkEnableOption "syncthing configuration";
+  };
+
+  config.home = {
+    services.syncthing = {
+      enable = true;
+      openDefaultPorts = true;
+    };
+  };
+}
diff --git a/hosts/tahoe/home.nix b/hosts/tahoe/home.nix
index 7ea3830..c183915 100644
--- a/hosts/tahoe/home.nix
+++ b/hosts/tahoe/home.nix
@@ -11,6 +11,7 @@
       enable = true;
       musicDirectory = "/data/fast/music";
     };
+    syncthing.enable = true;
     flac.enable = true;
     yt-dlp.enable = true;
   };