chore: move collabora-office to own file
This commit is contained in:
parent
3f073a83c4
commit
9aa9ef973f
|
@ -31,6 +31,7 @@ in with builtins; {
|
||||||
../services/miniflux.nix
|
../services/miniflux.nix
|
||||||
../services/paperless.nix
|
../services/paperless.nix
|
||||||
../services/nextcloud.nix
|
../services/nextcloud.nix
|
||||||
|
../services/collabora-office.nix
|
||||||
../services/calibre-web.nix
|
../services/calibre-web.nix
|
||||||
../services/focalboard.nix
|
../services/focalboard.nix
|
||||||
];
|
];
|
||||||
|
|
35
services/collabora-office.nix
Normal file
35
services/collabora-office.nix
Normal 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;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -37,39 +37,6 @@ in {
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Office
|
|
||||||
# TODO move to own config
|
|
||||||
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;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ensure that postgres is running *before* running the setup
|
# ensure that postgres is running *before* running the setup
|
||||||
systemd.services."nextcloud-setup" = {
|
systemd.services."nextcloud-setup" = {
|
||||||
requires = [ "postgresql.service" ];
|
requires = [ "postgresql.service" ];
|
||||||
|
|
Loading…
Reference in a new issue