forked from c3d2/nix-config
owncast: init
This commit is contained in:
parent
0bd2e02db7
commit
203cf88662
|
@ -984,6 +984,13 @@
|
|||
];
|
||||
};
|
||||
|
||||
owncast = nixosSystem' {
|
||||
modules = [
|
||||
self.nixosModules.cluster-options
|
||||
./hosts/owncast
|
||||
];
|
||||
nixpkgs = nixos-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
nixosModule = self.nixosModules.c3d2;
|
||||
|
|
|
@ -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}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
} ];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue