36 lines
819 B
Nix
36 lines
819 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
svc_domain = "chat.${config.mine.shared.settings.domain}";
|
|
|
|
# configure element web client
|
|
pkg_element = pkgs.element-web.override {
|
|
conf = {
|
|
default_theme = "dark";
|
|
features.feature_latex_maths = true;
|
|
disable_guests = true;
|
|
|
|
default_server_name = config.mine.shared.settings.domain;
|
|
};
|
|
};
|
|
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;
|
|
};
|
|
};
|
|
}
|