From c5f0dca0d51d10a1b2d7c16b4f4bf49b8498c9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 13 Sep 2023 10:25:23 +0200 Subject: [PATCH] feat: add collabora --- hosts/flora-6/caddy.nix | 8 ++++++++ hosts/flora-6/collabora.nix | 38 +++++++++++++++++++++++++++++++++++++ hosts/flora-6/flora-6.nix | 1 + 3 files changed, 47 insertions(+) create mode 100644 hosts/flora-6/collabora.nix diff --git a/hosts/flora-6/caddy.nix b/hosts/flora-6/caddy.nix index c76da453..1d521d21 100644 --- a/hosts/flora-6/caddy.nix +++ b/hosts/flora-6/caddy.nix @@ -126,6 +126,14 @@ reverse_proxy :18507 ''; }; + "collabora.pub.solar" = { + logFormat = lib.mkForce '' + output discard + ''; + extraConfig = '' + reverse_proxy :9980 + ''; + }; "obs-portal.pub.solar" = { logFormat = lib.mkForce '' output discard diff --git a/hosts/flora-6/collabora.nix b/hosts/flora-6/collabora.nix new file mode 100644 index 00000000..e44e7934 --- /dev/null +++ b/hosts/flora-6/collabora.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + pkgs, + self, + ... +}: { + + virtualisation = { + docker = { + enable = true; # sadly podman is not supported rightnow + extraOptions = '' + --data-root /data/docker + ''; + }; + + oci-containers = { + backend = "docker"; + containers."collabora" = { + image = "collabora/code"; + autoStart = true; + ports = [ + "9980:9980" + ]; + extraOptions = [ + "--cap-add MKNOD" + ]; + environment = { + server_name = "collabora.pub.solar"; + aliasgroup1 = "https://collabora.pub.solar:443"; + DONT_GEN_SSL_CERT = "1"; + extra_params = "--o:ssl.enable=false --o:ssl.termination=true"; + SLEEPFORDEBUGGER = "0"; + }; + }; + }; + }; +} diff --git a/hosts/flora-6/flora-6.nix b/hosts/flora-6/flora-6.nix index 34be1199..00b0b8bf 100644 --- a/hosts/flora-6/flora-6.nix +++ b/hosts/flora-6/flora-6.nix @@ -21,6 +21,7 @@ in { ./gitea.nix ./mailman.nix ./owncast.nix + ./collabora.nix profiles.base-user profiles.users.root # make sure to configure ssh keys