2021-01-31 22:31:04 +01:00
|
|
|
# A FLOSS media server
|
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.services.jellyfin;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.my.services.jellyfin = {
|
|
|
|
enable = lib.mkEnableOption "Jellyfin Media Server";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.jellyfin = {
|
|
|
|
enable = true;
|
|
|
|
group = "media";
|
|
|
|
};
|
|
|
|
|
2021-08-24 23:05:10 +02:00
|
|
|
my.services.nginx.virtualHosts = [
|
|
|
|
{
|
|
|
|
subdomain = "jellyfin";
|
|
|
|
port = 8096;
|
|
|
|
extraConfig = {
|
|
|
|
locations."/" = {
|
|
|
|
extraConfig = ''
|
|
|
|
proxy_buffering off;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
# Too bad for the repetition...
|
|
|
|
locations."/socket" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8096/";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2021-01-31 22:31:04 +01:00
|
|
|
};
|
|
|
|
}
|