2024-02-18 19:08:27 +08:00
|
|
|
{ pkgs
|
|
|
|
, config
|
|
|
|
, ...}: {
|
|
|
|
services.jellyfin = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
dataDir = "/nix/persist/service/jellyfin";
|
|
|
|
};
|
|
|
|
|
2024-02-19 12:36:44 +08:00
|
|
|
environment.systemPackages = with pkgs; [ jellyfin jellyfin-web jellyfin-ffmpeg ];
|
|
|
|
|
2024-02-18 19:08:27 +08:00
|
|
|
users.users.jellyfin.uid = 282;
|
|
|
|
users.groups.jellyfin.gid = 282;
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."jellyfin.514fpv.io" = {
|
|
|
|
useACMEHost = ".514fpv.io";
|
|
|
|
addSSL = true;
|
|
|
|
locations = {
|
|
|
|
"= /".return = "302 https://jellyfin.514fpv.io:2096/web/";
|
|
|
|
"/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8096";
|
|
|
|
extraConfig = ''
|
|
|
|
proxy_buffering off;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
"= /web/".proxyPass = "http://127.0.0.1:8096/web/index.html";
|
|
|
|
"/socket" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8096";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
global.fs.zfs.mountpoints."/nix/persist/service/jellyfin" = "service/jellyfin";
|
|
|
|
}
|