]> Git — Sourcephile - sourcephile-nix.git/blob - servers/losurdo/transmission.nix
nix: add julm to some meta.maintainers
[sourcephile-nix.git] / servers / losurdo / transmission.nix
1 { pkgs, lib, config, ... }:
2 let
3 inherit (config.services) transmission;
4 inherit (config.users) users;
5 in
6 {
7 users.groups.transmission.members = [
8 users."julm".name
9 ];
10 networking.nftables.ruleset = ''
11 add rule inet filter net2fw tcp dport ${toString transmission.settings.peer-port} counter accept comment "Transmission"
12 add rule inet filter net2fw udp dport ${toString transmission.settings.peer-port} counter accept comment "Transmission"
13 add rule inet filter fw2net ip protocol udp skuid ${users.transmission.name} counter accept comment "BitTorrent"
14 '';
15 services.transmission = {
16 enable = true;
17 settings = {
18 dht-enabled = true;
19 download-dir = "Downloads";
20 incomplete-dir-enabled = false;
21 peer-port = 6882;
22 peer-port-random-on-start = false;
23 port-forwarding-enabled = true;
24 preallocation = 0;
25 rpc-bind-address = "127.0.0.1";
26 rpc-enabled = true;
27 rpc-port = 9091;
28 rpc-whitelist = "127.0.0.1";
29 rpc-whitelist-enabled = true;
30 speed-limit-up = 10;
31 speed-limit-up-enabled = true;
32 umask = 63;
33 };
34 };
35 }