diff --git a/rpi4.nix b/rpi4.nix index 75fab4c..c23b395 100644 --- a/rpi4.nix +++ b/rpi4.nix @@ -67,6 +67,7 @@ in with builtins; { domains = [ "home.felschr.com" "cloud.felschr.com" + "office.felschr.com" "media.felschr.com" "news.felschr.com" "mqtt.felschr.com" diff --git a/services/nextcloud.nix b/services/nextcloud.nix index d828555..c6151d6 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -31,6 +31,26 @@ in { }]; }; + # Office + # TODO move to own config + virtualisation.oci-containers.containers.collabora-office = { + image = "collabora/code"; + ports = [ "9980:9980" ]; + environment = { + domain = builtins.replaceStrings [ "." ] [ "\\." ] "office.felschr.com"; + extra_params = "--o:ssl.enable=false --o:ssl.termination=true"; + }; + extraOptions = [ "--network=host" ]; + }; + services.nginx.virtualHosts."office.felschr.com" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:9980"; + proxyWebsockets = true; + }; + }; + # ensure that postgres is running *before* running the setup systemd.services."nextcloud-setup" = { requires = [ "postgresql.service" ];