mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
71 lines
1.8 KiB
Nix
71 lines
1.8 KiB
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
kw.fw.private.tcp.ports = singleton 1935;
|
|
kw.fw.public.tcp.ports = singleton 1935;
|
|
|
|
services.nginx.virtualHosts = {
|
|
"samhain.net.kittywit.ch" = {
|
|
useACMEHost = "samhain.net.kittywit.ch";
|
|
forceSSL = true;
|
|
locations = {
|
|
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
|
"/jellyfin/socket" = {
|
|
proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
|
extraConfig = ''
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
'';
|
|
};
|
|
"/tvheadend/".proxyPass = "http://192.168.1.245:9981";
|
|
"/" = {
|
|
root = "/mnt/zraw/media/";
|
|
extraConfig = "autoindex on;";
|
|
};
|
|
"/transmission" = {
|
|
proxyPass = "http://[::1]:9091";
|
|
extraConfig = "proxy_pass_header X-Transmission-Session-Id;";
|
|
};
|
|
};
|
|
};
|
|
"192.168.1.135" = {
|
|
locations = {
|
|
"/jellyfin/".proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
|
"/jellyfin/socket" = {
|
|
proxyPass = "http://127.0.0.1:8096/jellyfin/";
|
|
extraConfig = ''
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
'';
|
|
};
|
|
|
|
"/share/" = {
|
|
alias = "/mnt/zraw/media/";
|
|
extraConfig = "autoindex on;";
|
|
};
|
|
};
|
|
};
|
|
"100.103.111.44" = {
|
|
locations."/share/" = {
|
|
alias = "/mnt/zraw/media/";
|
|
extraConfig = "autoindex on;";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.nginx.appendConfig = ''
|
|
rtmp {
|
|
server {
|
|
listen [::]:1935 ipv6only=off;
|
|
application kattv {
|
|
live on;
|
|
|
|
allow publish all;
|
|
allow play all;
|
|
}
|
|
}
|
|
}
|
|
'';
|
|
}
|