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

View File

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