nix-infra/config/hosts/torrent/nginx.nix

81 lines
1.5 KiB
Nix
Raw Normal View History

{ ... }:
{
services.nginx = {
enable = true;
virtualHosts = {
"jackett.grzb.de" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 80;
}
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
];
locations = {
"/" = {
proxyPass = "http://127.0.0.1:9117";
proxyWebsockets = true;
};
};
};
"radarr.grzb.de" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 80;
}
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
];
locations = {
"/" = {
proxyPass = "http://127.0.0.1:7878";
proxyWebsockets = true;
};
};
};
"sonarr.grzb.de" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 80;
}
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
];
locations = {
"/" = {
proxyPass = "http://127.0.0.1:8989";
proxyWebsockets = true;
};
};
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}