chore: move collabora-office to own file

This commit is contained in:
Felix Schröter 2023-09-29 22:45:34 +02:00
parent 3f073a83c4
commit 9aa9ef973f
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 36 additions and 33 deletions

View file

@ -0,0 +1,35 @@
_:
{
virtualisation.oci-containers.containers.collabora-office = {
image = "docker.io/collabora/code";
ports = [ "9980:9980" ];
environment = let
mkAlias = domain:
"https://" + (builtins.replaceStrings [ "." ] [ "\\." ] domain)
+ ":443";
in {
server_name = "office.felschr.com";
aliasgroup1 = mkAlias "office.felschr.com";
aliasgroup2 = mkAlias "cloud.felschr.com";
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
};
extraOptions = [
"--network=host"
"--cap-add=MKNOD"
"--label=io.containers.autoupdate=registry"
];
};
services.nginx.virtualHosts."office.felschr.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:9980";
proxyWebsockets = true;
extraConfig = ''
proxy_read_timeout 36000s;
'';
};
};
}