Infini-OPTIPLEX: transfer services to Infini-DL360

This commit is contained in:
Infinidoge 2024-05-05 19:20:56 -04:00
parent 253c57dd8f
commit a9ccc13825
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
9 changed files with 7 additions and 7 deletions

View file

@ -1,54 +0,0 @@
{ config, pkgs, ... }:
let
address = "127.0.0.1";
port = 8096;
jellyfin = "http://${address}:${toString port}";
proxyConfig = ''
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;
'';
in
{
services.nginx.virtualHosts."jellyfin.inx.moe" = config.common.nginx.ssl // {
extraConfig = ''
client_max_body_size 20M;
'';
locations."= /" = {
return = "302 https://$host/web/";
};
locations."/" = {
proxyPass = jellyfin;
recommendedProxySettings = false;
extraConfig = proxyConfig + ''
proxy_buffering off;
'';
};
locations."= /web/" = {
proxyPass = "${jellyfin}/web/index.html";
recommendedProxySettings = false;
extraConfig = proxyConfig;
};
locations."/socket" = {
proxyPass = jellyfin;
proxyWebsockets = true;
recommendedProxySettings = false;
extraConfig = proxyConfig;
};
};
services.jellyfin = {
enable = true;
dataDir = "/srv/jellyfin";
openFirewall = true;
};
persist.directories = with config.services.jellyfin; [ dataDir cacheDir logDir ];
}