about summary refs log tree commit diff
path: root/hosts/common/server/transmission.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-06 11:38:51 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-06 11:38:51 -0800
commit7c6601e42e231176bcbab0fadf8d157e1c63dce4 (patch)
tree89af4f35686b8472bc9aa04ed72885f45e449a2f /hosts/common/server/transmission.nix
parentgrafana: rename the instance for the router (diff)
downloadworld-7c6601e42e231176bcbab0fadf8d157e1c63dce4.tar.gz
nas: install transmission
Create a user and group 'nas' so we can run tranmission in it. This will
also help us to enable some specific permissions on some directories.
Diffstat (limited to '')
-rw-r--r--hosts/common/server/transmission.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/hosts/common/server/transmission.nix b/hosts/common/server/transmission.nix
new file mode 100644
index 0000000..b32697e
--- /dev/null
+++ b/hosts/common/server/transmission.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+
+{
+  services.transmission = {
+    enable = true;
+    group = "nas";
+    performanceNetParameters = true;
+    home = "/data/fast/torrents";
+    settings = {
+      dht-enabled = false;
+      cache-size-mb = 128;
+      peer-port = 52213;
+      peer-port-random-low = 49152;
+      peer-port-random-high = 65535;
+      message-level = 2;
+
+      rpc-enabled = true;
+      rpc-whitelist-enabled = true;
+      rpc-whitelist = "127.0.0.1";
+      verify-threads = 4;
+    };
+  };
+
+  networking.firewall = {
+    allowedTCPPorts = [ 52213 ];
+    allowedUDPPorts = [ 52213 ];
+  };
+}