{ config, pkgs, ... }: let svc_domain = ".${config.mine.shared.settings.domain}"; pkg_element = pkgs.element-web.override { conf = { brand = "Fricloud chat"; default_server_config = { "m.homeserver" = { "base_url" = "https://fricloud.dk"; server_name = "fricloud.dk"; }; "m.identity_server" = { "base_url" = "https://vector.im"; }; }; }; }; in { services.nginx.virtualHosts."${svc_domain}" = { forceSSL = true; enableACME = true; locations."/". = { alias = "${pkg_element}/"; index = "index.html"; }; }; mine.shared.meta.element = { name = "Element"; description = "We host our own Element instance."; url = "https://${svc_domain}"; package = let pkg = pkg_element; in { name = pkg.pname; version = pkg.version; meta = pkg.meta; }; }; }