52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
deployment = {
|
|
vcpu = 8;
|
|
mem = 2048;
|
|
persistedShares = [ "/etc" "/home" "/var" ];
|
|
extraShares = [ {
|
|
source = "/glusterfs/big/microvms/c3d2/config/owncast/archive";
|
|
mountPoint = "/mnt/archive";
|
|
} ];
|
|
};
|
|
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;
|
|
};
|
|
locations."/archive" = {
|
|
root = "/mnt/archive";
|
|
extraConfig = ''
|
|
fancyindex on;
|
|
fancyindex_exact_size off;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|