{ config, pkgs, ... }: let svc_domain = "chat.${config.mine.shared.settings.domain}"; # configure element web client pkg_element = pkgs.element-web.override { conf = { default_server_name = config.mine.shared.settings.domain; embedded_pages.login_for_welcome = true; disable_guests = true; brand = config.mine.shared.settings.brand; default_theme = "dark"; features.feature_latex_maths = true; }; }; in { services.nginx.virtualHosts."${svc_domain}" = { forceSSL = true; enableACME = true; locations."/".root = pkg_element; }; mine.shared.meta.element = { name = "Element"; description = "We host our own Element instance, get on it and start chatting!"; url = "https://${svc_domain}"; package = let pkg = pkg_element; in { name = pkg.pname; version = pkg.version; meta = pkg.meta; }; }; }