2023-04-19 19:30:42 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.jellyfin = {
|
|
|
|
enable = true;
|
|
|
|
user = "media_user";
|
|
|
|
group = "media_group";
|
|
|
|
openFirewall = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."jellyfin.internal.kempkens.network" = {
|
2023-04-19 19:59:00 +00:00
|
|
|
listen = [{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 9920;
|
|
|
|
ssl = true;
|
|
|
|
}];
|
|
|
|
|
2023-04-19 19:30:42 +00:00
|
|
|
quic = true;
|
|
|
|
http3 = true;
|
|
|
|
|
|
|
|
onlySSL = true;
|
|
|
|
useACMEHost = "internal.kempkens.network";
|
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
recommendedProxySettings = true;
|
2023-04-19 19:59:00 +00:00
|
|
|
proxyPass = "http://127.0.0.1:8096";
|
2023-04-19 19:30:42 +00:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2023-04-19 20:05:30 +00:00
|
|
|
|
|
|
|
networking.firewall.interfaces =
|
|
|
|
let
|
|
|
|
ports = [ 9920 ];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
"ens3".allowedTCPPorts = ports;
|
|
|
|
"tailscale0".allowedTCPPorts = ports;
|
|
|
|
};
|
2023-04-19 19:30:42 +00:00
|
|
|
}
|