backwards: Add reverse proxy for jellyfin
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nginxEnabled = config.mod.nginx.enable;
|
||||
in
|
||||
{
|
||||
fileSystems."/home/alex/media" = {
|
||||
device = "/dev/disk/by-uuid/ad4acc0f-172c-40f8-8473-777c957e8764";
|
||||
@@ -26,7 +34,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
services = {
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
@@ -36,6 +45,22 @@
|
||||
dataDir = "/home/alex/media/jellyfin";
|
||||
};
|
||||
|
||||
nginx = lib.mkIf nginxEnabled {
|
||||
virtualHosts."jelly.ppp.pm" = {
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
};
|
||||
|
||||
"/socket" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.jellyfin
|
||||
pkgs.jellyfin-web
|
||||
|
||||
Reference in New Issue
Block a user