mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
44 lines
801 B
Nix
44 lines
801 B
Nix
![]() |
{ flake, ... }:
|
||
|
let
|
||
|
inherit (flake.config.services.instances)
|
||
|
owncast
|
||
|
web
|
||
|
;
|
||
|
service = owncast;
|
||
|
localhost = web.localhost.address1;
|
||
|
host = "${service.subdomain}.${web.domains.url1}";
|
||
|
in
|
||
|
{
|
||
|
services = {
|
||
|
owncast = {
|
||
|
enable = true;
|
||
|
listen = localhost;
|
||
|
port = service.ports.port0;
|
||
|
openFirewall = true;
|
||
|
};
|
||
|
|
||
|
caddy = {
|
||
|
virtualHosts = {
|
||
|
"${host}" = {
|
||
|
extraConfig = ''
|
||
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||
|
|
||
|
tls ${service.ssl.cert} ${service.ssl.key}
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking = {
|
||
|
firewall = {
|
||
|
allowedTCPPorts = [
|
||
|
service.ports.port0
|
||
|
service.ports.port1
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# OBS Server rtmp://192.168.50.140:1935/live
|
||
|
}
|