Bruno BELANYI
932717b754
All checks were successful
ci/woodpecker/push/check Pipeline was successful
I just noticed that all the metadata files Jellyfin stores have very restrictive ACLs. The whole point of the `media` group is to make my HTPC eco-system work together. In particular this should allow Sonarr and friends to delete folders without manual intervention.
46 lines
970 B
Nix
46 lines
970 B
Nix
# 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";
|
|
};
|
|
|
|
# Set-up media group
|
|
users.groups.media = { };
|
|
|
|
systemd.services.jellyfin = {
|
|
serviceConfig = {
|
|
# Loose umask to make Jellyfin metadata more broadly readable
|
|
UMask = lib.mkForce "0002";
|
|
};
|
|
};
|
|
|
|
my.services.nginx.virtualHosts = {
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|