2022-11-18 17:51:09 +01:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
let
|
2022-09-28 13:49:18 +02:00
|
|
|
website = pkgs.fetchgit {
|
|
|
|
url = "ssh+git://git@github.com:fsr/fruitbasket.git";
|
2022-09-22 10:36:34 +02:00
|
|
|
rev = "1b380f3bfd48aae2a17aefbbdd0538f09b7d3bcf";
|
|
|
|
sha256 = "";
|
|
|
|
};
|
2022-11-18 17:51:09 +01:00
|
|
|
in
|
|
|
|
{
|
2022-09-22 10:36:34 +02:00
|
|
|
services = {
|
|
|
|
nginx = {
|
|
|
|
virtualHosts = {
|
2022-11-18 17:51:09 +01:00
|
|
|
"stream.ifsr.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
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
|
|
|
#streamConfig = ''
|
|
|
|
# server {
|
|
|
|
# listen 1935;
|
|
|
|
# proxy_pass [::1]:1935;
|
|
|
|
# proxy_buffer_size 32k;
|
|
|
|
#}
|
|
|
|
#'';
|
|
|
|
};
|
|
|
|
owncast = {
|
|
|
|
enable = true;
|
|
|
|
port = 13142;
|
|
|
|
listen = "[::ffff:127.0.0.1]";
|
|
|
|
openFirewall = true;
|
|
|
|
rtmp-port = 1935;
|
|
|
|
};
|
2022-09-22 10:36:34 +02:00
|
|
|
};
|
|
|
|
}
|