70 lines
1.8 KiB
Nix
70 lines
1.8 KiB
Nix
|
|
{ config, ... }:
|
||
|
|
let
|
||
|
|
cfg = import /etc/nixos/modules/vars.nix;
|
||
|
|
radarr_port = cfg.arrstack.radarr.port;
|
||
|
|
outpost_port = cfg.authentik.outpostPort;
|
||
|
|
domain = "mc-fucker.cool";
|
||
|
|
in
|
||
|
|
{
|
||
|
|
|
||
|
|
virtualisation.oci-containers.containers.radarr = {
|
||
|
|
image = "lscr.io/linuxserver/radarr:latest";
|
||
|
|
environment = {
|
||
|
|
TZ = "Europe/Berlin";
|
||
|
|
PUID = toString config.users.users.arr.uid;
|
||
|
|
PGID = toString config.users.groups.arr.gid;
|
||
|
|
};
|
||
|
|
ports = [
|
||
|
|
"${radarr_port}:${radarr_port}"
|
||
|
|
];
|
||
|
|
volumes = [
|
||
|
|
"/var/lib/radarr:/config"
|
||
|
|
"/mnt/mergerfs/media:/data"
|
||
|
|
"/mnt/ultracc/downloads:/mnt/ultracc"
|
||
|
|
];
|
||
|
|
extraOptions = cfg.podman.extraOptions;
|
||
|
|
autoStart = false;
|
||
|
|
};
|
||
|
|
|
||
|
|
services.nginx.virtualHosts = {
|
||
|
|
"radarr.${domain}" = {
|
||
|
|
forceSSL = true;
|
||
|
|
enableACME = true;
|
||
|
|
locations =
|
||
|
|
let
|
||
|
|
common = ''
|
||
|
|
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;
|
||
|
|
'';
|
||
|
|
in
|
||
|
|
{
|
||
|
|
"/" = {
|
||
|
|
proxyPass = "http://127.0.0.1:${outpost_port}";
|
||
|
|
extraConfig = common;
|
||
|
|
};
|
||
|
|
"/api" = {
|
||
|
|
proxyPass = "http://127.0.0.1:${radarr_port}";
|
||
|
|
extraConfig = common;
|
||
|
|
};
|
||
|
|
"/signalr" = {
|
||
|
|
proxyPass = "http://127.0.0.1:${radarr_port}";
|
||
|
|
extraConfig = common;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
extraConfig = ''
|
||
|
|
access_log /var/log/nginx/radarr.${domain}_access.log;
|
||
|
|
error_log /var/log/nginx/radarr.${domain}_error.log;
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|
||
|
|
# vim: set et ts=2 sw=2 ai:
|