Skip to content

Commit

Permalink
fix(modules/jellyfin): Fix jellyfin nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
etu committed Jun 7, 2024
1 parent ea0e316 commit 923eb32
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions modules/services/jellyfin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,13 @@
# Make sure to have nginx enabled
services.nginx.enable = true;
services.nginx.clientMaxBodySize = "20m"; # Increase body size since we handle video.
services.nginx.virtualHosts.${config.etu.services.jellyfin.hostname} = let
locationConfig = {
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:8096/";
extraConfig = ''
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-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
proxy_buffering off;
'';
};
in {
services.nginx.virtualHosts.${config.etu.services.jellyfin.hostname} = {
forceSSL = true;
enableACME = true;
locations."/" = locationConfig;
locations."= /web/" = locationConfig;
locations."/socket" = locationConfig;
locations."/" = {
proxyPass = "http://127.0.0.1:8096";
proxyWebsockets = true;
};
};

# Bind mount for persistent data for jellyfin
Expand Down

0 comments on commit 923eb32

Please sign in to comment.