about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/stream.emile.space.nix
blob: 21ee6272c1fe8da153bfa9543919b6c572469012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, ... }:

let
  ports = import ../ports.nix;
in {
  services.nginx.virtualHosts."stream.emile.space" = {
    forceSSL = true;
    enableACME = true;

    locations = {
      "/" = {
        proxyPass = "http://127.0.0.1:${toString config.services.owncast.port}";
        proxyWebsockets = true;
      };
    };
  };

  services.owncast = {
    enable = true;
    openFirewall = true;
    listen = "0.0.0.0";
    dataDir = "/var/lib/owncast";
    rtmp-port = ports.stream_rtmp;
    port = ports.stream; # web interface
  };
}