infrastructure/depot/services/jellyfin/default.nix
2021-08-09 02:41:43 +01:00

39 lines
1 KiB
Nix

{ config, lib, pkgs, ... }:
{
services.nginx.virtualHosts = {
"${config.networking.hostName}.${config.kw.dns.ygg_prefix}.${config.kw.dns.domain}".locations = {
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
"/jellyfin/socket" = {
proxyPass = "http://127.0.0.1:8096/jellyfin/";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
${config.kw.dns.ipv4}.locations = {
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
"/jellyfin/socket" = {
proxyPass = "http://127.0.0.1:8096/jellyfin/";
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
};
kw.fw = {
public.tcp.ranges = [{
from = 32768;
to = 60999;
}];
private.tcp.ranges = [{
from = 32768;
to = 60999;
}];
};
services.jellyfin.enable = true;
}