blob: f6828194ffac32fd5ab17af4b777071f98154ae2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ self, config, lib, pkgs, ... }:
with self.lib.nginx;
{
imports = [ ./rutorrent.nix ];
security.acme.certs = {
"media.cocaine.farm" = {
extraDomainNames = [ "*.media.cocaine.farm" ];
};
};
services.jellyfin.enable = true;
services.jackett.enable = true;
services.rutorrent = {
enable = true;
hostName = "torrent.media.cocaine.farm";
rpcSocket = "10.101.131.197";
plugins = lib.mkForce [ "data" "diskspace" "edit" "erasedata" "theme" "trafic" ];
nginx.enable = true;
};
services.nginx = {
enable = true;
virtualHosts = {
"media.cocaine.farm" = (proxyDomain "media.cocaine.farm" "http://127.0.0.1:8096/");
"sonarr.media.cocaine.farm" = proxyDomainAuth "media.cocaine.farm" "http://10.101.73.6:80";
"radarr.media.cocaine.farm" = proxyDomainAuth "media.cocaine.farm" "http://10.101.22.234:80";
"jackett.media.cocaine.farm" = proxyDomainAuth "media.cocaine.farm" "http://127.0.0.1:9117";
"torrent.media.cocaine.farm" = {
addSSL = true;
useACMEHost = "media.cocaine.farm";
locations."/RPC2" = {
extraConfig = ''
include ${pkgs.nginx}/conf/scgi_params;
scgi_pass 10.101.131.197:5000;
'';
};
# locations."/" = {
# proxyPass = "http://127.0.0.1";
# proxyWebsockets = true;
# extraConfig = ''
# proxy_pass_header Authorization;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $host;
# proxy_set_header Upgrade $http_upgrade;
# '';
# };
};
};
};
}
|