You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
{ config, lib, ... }:
|
|
|
|
{
|
|
# Default port should be 8096
|
|
services.jellyfin = {
|
|
enable = true;
|
|
group = "core";
|
|
};
|
|
|
|
# Required for chromecast stuff...
|
|
networking.firewall.allowedTCPPorts = [ 8096 ];
|
|
|
|
# Give jellyfin "core" group
|
|
users.users.jellyfin.extraGroups = [ "core" ];
|
|
|
|
# Enable nginx if not already
|
|
services.nginx.enable = true;
|
|
services.nginx.virtualHosts."media.kookiejar.tech" = {
|
|
serverAliases = [ "media.alarei.kookie.space" "kookiejar.tech" ];
|
|
useACMEHost = "alarei.kookie.space";
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:8096";
|
|
};
|
|
|
|
locations."/socket" = {
|
|
proxyPass = "http://127.0.0.1:8096";
|
|
extraConfig = ''
|
|
# global proxy conf
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
# websocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
'';
|
|
};
|
|
};
|
|
|
|
}
|
|
|