nix-config/hosts/owncast/default.nix

41 lines
795 B
Nix

{ config, ... }:
{
deployment = {
persistedShares = [ "/etc" "/home" "/var" ];
vcpu = 8;
mem = 2048;
};
c3d2.hq.statistics.enable = true;
networking = {
hostName = "owncast";
firewall.allowedTCPPorts = [ 80 443 ];
};
services.owncast = {
enable = true;
openFirewall = true;
};
services.nginx = {
enable = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
virtualHosts."owncast.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" =
let
inherit (config.services.owncast) port;
in {
proxyPass = "http://127.0.0.1:${toString port}";
proxyWebsockets = true;
};
};
};
}