Infini-OPTIPLEX: add jellyfin
This commit is contained in:
parent
bdce955801
commit
e78366dc67
2 changed files with 31 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
./freshrss.nix
|
./freshrss.nix
|
||||||
./thelounge.nix
|
./thelounge.nix
|
||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
|
./jellyfin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
30
hosts/Infini-OPTIPLEX/jellyfin.nix
Normal file
30
hosts/Infini-OPTIPLEX/jellyfin.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
address = "127.0.0.1";
|
||||||
|
port = 8096;
|
||||||
|
jellyfin = "http://${address}:${toString port}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts."jellyfin.inx.moe" = config.common.nginx.ssl // {
|
||||||
|
locations."= /" = {
|
||||||
|
return = "302 https://$host/web/";
|
||||||
|
};
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = jellyfin;
|
||||||
|
};
|
||||||
|
|
||||||
|
locations."/socket" = {
|
||||||
|
proxyPass = jellyfin;
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = "/srv/jellyfin";
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
persist.directories = with config.services.jellyfin; [ dataDir cacheDir logDir ];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue