nixos-config/machines/chungus/media-jellyfin.nix

40 lines
981 B
Nix
Raw Normal View History

2024-08-29 03:26:04 +02:00
{
config,
lib,
pkgs,
...
}:
2023-05-05 22:33:05 +02:00
{
services.jellyfin = {
enable = true;
2024-08-06 16:35:09 +02:00
openFirewall = true; # todo: will open for retiolum as well
2023-05-05 22:33:05 +02:00
group = "media";
user = "media";
};
healthchecks.http.jellyfin = {
url = "flix.${config.networking.hostName}.private";
};
healthchecks.closed.retiolum.ports.jellyfin = [ 8096 ];
2023-05-05 22:33:05 +02:00
services.nginx = {
enable = true;
virtualHosts."flix.${config.networking.hostName}.private" = {
serverAliases = [ "flix.${config.networking.hostName}" ];
extraConfig = ''
# Security / XSS Mitigation Headers
# NOTE: X-Frame-Options may cause issues with the webOS app
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
'';
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://localhost:8096";
};
};
};
}