|
1 |
| -{ pkgs, config, lib, ... }: |
| 1 | +{ |
| 2 | + pkgs, |
| 3 | + config, |
| 4 | + lib, |
| 5 | + ... |
| 6 | +}: |
2 | 7 | let
|
3 |
| - unstable = import <nixos-unstable> { }; |
4 | 8 | in
|
| 9 | +# unstable = import <nixos-unstable> { }; |
5 | 10 | {
|
6 |
| - users.groups.media.members = [ "plex" "radarr" "sonarr" "deluge" "tchekda" "nginx" ]; |
| 11 | + users.groups.media.members = [ |
| 12 | + "plex" |
| 13 | + "radarr" |
| 14 | + "sonarr" |
| 15 | + "deluge" |
| 16 | + "tchekda" |
| 17 | + "nginx" |
| 18 | + ]; |
7 | 19 |
|
8 | 20 | networking.firewall = {
|
9 | 21 | # rTorrent incoming
|
10 |
| - allowedTCPPortRanges = [{ from = 40000; to = 59000; }]; |
11 |
| - allowedUDPPortRanges = [{ from = 40000; to = 59000; }]; |
| 22 | + allowedTCPPortRanges = [ |
| 23 | + { |
| 24 | + from = 40000; |
| 25 | + to = 59000; |
| 26 | + } |
| 27 | + ]; |
| 28 | + allowedUDPPortRanges = [ |
| 29 | + { |
| 30 | + from = 40000; |
| 31 | + to = 59000; |
| 32 | + } |
| 33 | + ]; |
12 | 34 | # DHT
|
13 | 35 | allowedUDPPorts = [ 6881 ];
|
14 | 36 | };
|
|
19 | 41 | openFirewall = true;
|
20 | 42 | };
|
21 | 43 |
|
22 |
| - sonarr.enable = true; |
23 |
| - radarr.enable = true; |
| 44 | + sonarr = { |
| 45 | + enable = true; |
| 46 | + group = "media"; |
| 47 | + }; |
| 48 | + radarr = { |
| 49 | + enable = true; |
| 50 | + group = "media"; |
| 51 | + }; |
24 | 52 |
|
25 | 53 | rtorrent = {
|
26 | 54 | enable = true;
|
27 |
| - package = unstable.rtorrent; |
| 55 | + # package = unstable.rtorrent; |
28 | 56 | dataPermissions = "0777";
|
29 | 57 | downloadDir = "/srv/downloads";
|
30 | 58 | group = "media";
|
31 | 59 | configText = ''
|
32 | 60 | dht.mode.set = auto
|
33 | 61 | dht.port.set = 6881
|
34 |
| - |
| 62 | +
|
35 | 63 | log.add_output = "debug", "log"
|
36 |
| - |
| 64 | +
|
37 | 65 | # network.http.proxy_address.set = socks5h://45.67.230.130:30289
|
38 | 66 | # network.port_random.set = no
|
39 | 67 | network.port_range.set = 40000-59000
|
40 |
| - |
| 68 | +
|
41 | 69 | protocol.encryption.set = allow_incoming,try_outgoing,enable_retry
|
42 | 70 | protocol.pex.set = 1
|
43 | 71 |
|
44 | 72 | schedule2 = scgi_permission,0,0,"execute.nothrow=chmod,777,/run/rtorrent/rpc.sock"
|
45 |
| - |
| 73 | + schedule2 = data_permission,0,0,"execute.nothrow=chgrp,media,/srv/downloads" |
| 74 | +
|
46 | 75 | system.umask.set = 000
|
47 |
| - |
| 76 | +
|
48 | 77 | trackers.use_udp.set = 1
|
49 | 78 | '';
|
50 | 79 | };
|
|
69 | 98 | };
|
70 | 99 | };
|
71 | 100 | }
|
72 |
| - |
|
0 commit comments