60 lines
1.8 KiB
Nix
60 lines
1.8 KiB
Nix
|
|
{ config, ... }:
|
||
|
|
let
|
||
|
|
cfg = import /etc/nixos/modules/vars.nix;
|
||
|
|
jellyseerr_port = cfg.arrstack.jellyseerr.port;
|
||
|
|
outpost_port = cfg.authentik.outpostPort;
|
||
|
|
domain = "mc-fucker.cool";
|
||
|
|
in
|
||
|
|
{
|
||
|
|
|
||
|
|
virtualisation.oci-containers.containers.jellyseerr = {
|
||
|
|
image = "docker.io/fallenbagel/jellyseerr";
|
||
|
|
environment = {
|
||
|
|
TZ = "Europe/Berlin";
|
||
|
|
};
|
||
|
|
ports = [
|
||
|
|
"${jellyseerr_port}:${jellyseerr_port}"
|
||
|
|
];
|
||
|
|
volumes = [
|
||
|
|
"/var/lib/jellyseerr:/app/config"
|
||
|
|
];
|
||
|
|
extraOptions = cfg.podman.extraOptions;
|
||
|
|
};
|
||
|
|
|
||
|
|
services.nginx.virtualHosts = {
|
||
|
|
|
||
|
|
"jellyseerr.${domain}" = {
|
||
|
|
forceSSL = true;
|
||
|
|
enableACME = true;
|
||
|
|
locations = {
|
||
|
|
"/" = {
|
||
|
|
proxyPass = "http://127.0.0.1:${jellyseerr_port}";
|
||
|
|
extraConfig = ''
|
||
|
|
proxy_set_header Referer $http_referer;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Real-Port $remote_port;
|
||
|
|
proxy_set_header X-Forwarded-Host $host:$remote_port;
|
||
|
|
proxy_set_header X-Forwarded-Server $host;
|
||
|
|
proxy_set_header X-Forwarded-Port $remote_port;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
|
proxy_set_header X-Forwarded-Ssl on;
|
||
|
|
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $http_connection;
|
||
|
|
proxy_redirect off;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
extraConfig = ''
|
||
|
|
access_log /var/log/nginx/jellyseerr.${domain}_access.log;
|
||
|
|
error_log /var/log/nginx/jellyseerr.${domain}_error.log;
|
||
|
|
'';
|
||
|
|
};
|
||
|
|
|
||
|
|
};
|
||
|
|
}
|
||
|
|
# vim: set et ts=2 sw=2 ai:
|