1
1
Fork 0
nixos-configs/machine/backyard/jellyfin.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

2023-10-22 20:56:06 +00:00
{ pkgs, ... }:
{
# Enable jellyfin
services.jellyfin.enable = true;
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
# Create a default vhost to deny traffic, so traffic has to actually match a vhost
default = {
default = true;
locations."/".return = "444";
};
2024-04-16 01:51:38 +00:00
"jellyfin.home.ktvb.site" = {
2023-10-22 20:56:06 +00:00
listen = [
2024-04-16 01:51:38 +00:00
# The router should have a static lease for this IP and a host entry naming it
{ addr = "192.168.1.236"; port = 80; }
# beatific module sends traffic over the vpn
{ addr = "10.22.20.8"; port = 80; }
# Also available on an extra port in case of port 80 troubles
2023-10-22 20:56:06 +00:00
{ addr = "10.22.20.8"; port = 8096; }
];
locations."/".extraConfig = ''
proxy_buffering off;
proxy_pass http://localhost:8096/;
'';
};
};
};
networking.firewall.allowedTCPPorts = [
80 # http
8096 # jellyfin
];
2024-01-31 00:07:49 +00:00
users.users.tvb.extraGroups = [ "jellyfin" ];
2023-10-22 20:56:06 +00:00
}