owncast: format

This commit is contained in:
Sandro - 2023-09-15 22:57:53 +02:00
parent d4bdffecdb
commit 4f8e8119b8
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 27 additions and 23 deletions

View File

@ -14,33 +14,37 @@
networking.hostName = "owncast";
services.owncast = {
enable = true;
openFirewall = true;
};
services = {
nginx = {
enable = true;
additionalModules = [ pkgs.nginxModules.fancyindex ];
virtualHosts."owncast.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
services.nginx = {
enable = true;
additionalModules = [ pkgs.nginxModules.fancyindex ];
virtualHosts."owncast.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.owncast.port}";
proxyWebsockets = true;
};
locations."/archive".return = "307 /archive/";
locations."/archive/" = {
alias = "${config.services.owncast-archiver.targetDir}/";
extraConfig = ''
fancyindex on;
fancyindex_exact_size off;
'';
locations = {
"/" = {
proxyPass = "http://127.0.0.1:${toString config.services.owncast.port}";
proxyWebsockets = true;
};
"/archive".return = "307 /archive/";
"/archive/" = {
alias = "${config.services.owncast-archiver.targetDir}/";
extraConfig = ''
fancyindex on;
fancyindex_exact_size off;
'';
};
};
};
};
owncast = {
enable = true;
openFirewall = true;
};
};
systemd.services.nginx.serviceConfig.ReadWritePaths = [
config.services.owncast-archiver.targetDir
];