owncast: init

This commit is contained in:
Astro 2022-11-21 19:39:38 +01:00
parent 0bd2e02db7
commit 203cf88662
3 changed files with 47 additions and 0 deletions

View File

@ -984,6 +984,13 @@
];
};
owncast = nixosSystem' {
modules = [
self.nixosModules.cluster-options
./hosts/owncast
];
nixpkgs = nixos-unstable;
};
};
nixosModule = self.nixosModules.c3d2;

37
hosts/owncast/default.nix Normal file
View File

@ -0,0 +1,37 @@
{ config, ... }:
{
deployment = {
persistedShares = [ "/etc" "/home" "/var" ];
mem = 512;
};
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."/".proxyPass =
let
inherit (config.services.owncast) port;
in
"http://localhost:${toString port}";
};
};
}

View File

@ -133,6 +133,9 @@
} {
hostNames = [ "zengel.datenspuren.de" ];
proxyTo.host = config.c3d2.hosts.zengel.ip4;
} {
hostNames = [ "owncast.c3d2.de" ];
proxyTo.host = config.c3d2.hosts.owncast.ip4;
} ];
};