215 lines
6.5 KiB
Nix
215 lines
6.5 KiB
Nix
{ ... }:
|
|
let
|
|
cfg = import ./vars.nix;
|
|
bazarr_port = cfg.arrstack.bazarr.port;
|
|
prowlarr_port = cfg.arrstack.prowlarr.port;
|
|
radarr_port = cfg.arrstack.radarr.port;
|
|
sonarr_port = cfg.arrstack.sonarr.port;
|
|
sabnzbd_port = cfg.arrstack.sabnzbd.port;
|
|
outpost_port = cfg.authentik.outpostPort;
|
|
domain = "mc-fucker.cool";
|
|
in
|
|
{
|
|
|
|
#container config
|
|
virtualisation.oci-containers.containers.bazarr = {
|
|
image = "lscr.io/linuxserver/bazarr:latest";
|
|
environment = {
|
|
TZ = "Europe/Berlin";
|
|
};
|
|
ports = [
|
|
"${bazarr_port}:${bazarr_port}"
|
|
];
|
|
volumes = [
|
|
"/var/lib/bazarr:/config"
|
|
"/mnt/arrstack:/data"
|
|
"/mnt/gdrive/movies:/data/media/movies"
|
|
"/mnt/gdrive/Serien:/data/media/tv"
|
|
];
|
|
extraOptions = cfg.podman.extraOptions;
|
|
};
|
|
|
|
virtualisation.oci-containers.containers.prowlarr = {
|
|
image = "lscr.io/linuxserver/prowlarr:latest";
|
|
environment = {
|
|
TZ = "Europe/Berlin";
|
|
};
|
|
ports = [
|
|
"${prowlarr_port}:${prowlarr_port}"
|
|
];
|
|
volumes = [
|
|
"/var/lib/prowlarr:/config"
|
|
];
|
|
extraOptions = cfg.podman.extraOptions;
|
|
};
|
|
|
|
virtualisation.oci-containers.containers.radarr = {
|
|
image = "lscr.io/linuxserver/radarr:latest";
|
|
environment = {
|
|
TZ = "Europe/Berlin";
|
|
};
|
|
ports = [
|
|
"${radarr_port}:${radarr_port}"
|
|
];
|
|
volumes = [
|
|
"/var/lib/radarr:/config"
|
|
"/mnt/arrstack:/data"
|
|
"/mnt/gdrive/movies:/data/media/movies"
|
|
];
|
|
extraOptions = cfg.podman.extraOptions;
|
|
};
|
|
|
|
virtualisation.oci-containers.containers.sonarr = {
|
|
image = "lscr.io/linuxserver/sonarr:latest";
|
|
environment = {
|
|
TZ = "Europe/Berlin";
|
|
};
|
|
ports = [
|
|
"${sonarr_port}:${sonarr_port}"
|
|
];
|
|
volumes = [
|
|
"/var/lib/sonarr:/config"
|
|
"/mnt/arrstack:/data"
|
|
"/mnt/gdrive/Serien:/data/media/tv"
|
|
];
|
|
extraOptions = cfg.podman.extraOptions;
|
|
};
|
|
|
|
|
|
virtualisation.oci-containers.containers.sabnzbd = {
|
|
image = "lscr.io/linuxserver/sabnzbd:latest";
|
|
environment = {
|
|
TZ = "Europe/Berlin";
|
|
};
|
|
ports = [
|
|
"${sabnzbd_port}:8080"
|
|
];
|
|
volumes = [
|
|
"/var/lib/sabnzbd:/config"
|
|
"/mnt/arrstack/usenet:/data/usenet"
|
|
];
|
|
extraOptions = cfg.podman.extraOptions;
|
|
};
|
|
|
|
#webserver config
|
|
imports = [ ./nginx.nix ];
|
|
|
|
services.nginx.virtualHosts = {
|
|
"bazarr.${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://127.0.0.1:${outpost_port}";
|
|
extraConfig = ''
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_redirect off;
|
|
access_log /var/log/nginx/bazarr.${domain}_access.log;
|
|
error_log /var/log/nginx/bazarr.${domain}_error.log;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
"prowlarr.${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://127.0.0.1:${outpost_port}";
|
|
extraConfig = ''
|
|
#proxy_set_header Host $proxy_host;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
access_log /var/log/nginx/prowlarr.${domain}_access.log;
|
|
error_log /var/log/nginx/prowlarr.${domain}_error.log;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
"radarr.${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://127.0.0.1:${outpost_port}";
|
|
extraConfig = ''
|
|
#proxy_set_header Host $proxy_host;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
access_log /var/log/nginx/radarr.${domain}_access.log;
|
|
error_log /var/log/nginx/radarr.${domain}_error.log;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
"sonarr.${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://127.0.0.1:${outpost_port}";
|
|
extraConfig = ''
|
|
#proxy_set_header Host $proxy_host;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
access_log /var/log/nginx/sonarr.${domain}_access.log;
|
|
error_log /var/log/nginx/sonarr.${domain}_error.log;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
"sabnzbd.${domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://127.0.0.1:${sabnzbd_port}";
|
|
extraConfig = ''
|
|
client_max_body_size 100m;
|
|
# proxy_set_header Host $proxy_host;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# proxy_set_header X-Forwarded-Host $host;
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
# proxy_set_header Connection $http_connection;
|
|
# proxy_redirect off;
|
|
# proxy_http_version 1.1;
|
|
access_log /var/log/nginx/sabnzbd.${domain}_access.log;
|
|
error_log /var/log/nginx/sabnzbd.${domain}_error.log;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
# vim: set et ts=2 sw=2 ai:
|