2023-09-17 20:14:32 +02:00
|
|
|
{ config, ... }:
|
2022-11-18 17:51:09 +01:00
|
|
|
{
|
2022-09-22 10:36:34 +02:00
|
|
|
services = {
|
|
|
|
nginx = {
|
|
|
|
virtualHosts = {
|
2023-09-17 20:10:55 +02:00
|
|
|
"stream.${config.networking.domain}" = {
|
2022-11-18 17:51:09 +01:00
|
|
|
locations."/" =
|
|
|
|
let
|
|
|
|
cfg = config.services.owncast;
|
|
|
|
in
|
|
|
|
{
|
2022-09-28 08:06:27 +02:00
|
|
|
proxyPass = "http://${toString cfg.listen}:${toString cfg.port}";
|
2022-09-22 10:36:34 +02:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-18 17:51:09 +01:00
|
|
|
};
|
|
|
|
owncast = {
|
|
|
|
enable = true;
|
|
|
|
port = 13142;
|
|
|
|
listen = "[::ffff:127.0.0.1]";
|
|
|
|
openFirewall = true;
|
|
|
|
rtmp-port = 1935;
|
|
|
|
};
|
2022-09-22 10:36:34 +02:00
|
|
|
};
|
|
|
|
}
|