stockholm/makefu/2configs/home/jellyfin.nix

35 lines
983 B
Nix
Raw Normal View History

2022-06-06 19:08:36 +00:00
{ lib, config, ... }:
let
port = 8096;
in
2022-06-06 19:08:36 +00:00
{
services.jellyfin.enable = true;
# services.jellyfin.openFirewall = true;
networking.firewall.interfaces.wiregrill = {
allowedTCPPorts = [ 80 port 8920 ];
allowedUDPPorts = [ 1900 7359 ];
};
2022-06-06 19:08:36 +00:00
state = [ "/var/lib/jellyfin" ];
users.users.${config.services.jellyfin.user}.extraGroups = [ "download" "video" "render" ];
systemd.services.jellyfin = {
after = [ "media-cloud.mount" ];
serviceConfig = rec {
RequiresMountFor = [ "/media/cloud" ];
SupplementaryGroups = lib.mkForce [ "video" "render" "download" ];
UMask = lib.mkForce "0077";
};
};
services.nginx.virtualHosts."jelly" = {
serverAliases = [
"jelly.lan" "movies.lan"
"jelly.makefu.w" "makefu.omo.w"
];
locations."/" = {
proxyPass = "http://localhost:${toString port}";
proxyWebsockets = true;
};
};
2022-06-06 19:08:36 +00:00
}