loptland: init element-web
This commit is contained in:
parent
8406518178
commit
85eebcd2ed
3 changed files with 63 additions and 0 deletions
47
modules/server/element-web.nix
Normal file
47
modules/server/element-web.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
flake.modules.nixos.element-web =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
matrixDomain = "alwayssleepy.online";
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."chat.${matrixDomain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = matrixDomain;
|
||||
|
||||
locations."= /config.json" = {
|
||||
extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '${builtins.toJSON {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix.${matrixDomain}";
|
||||
server_name = matrixDomain;
|
||||
};
|
||||
};
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
features = {
|
||||
feature_group_calls = true;
|
||||
};
|
||||
element_call = {
|
||||
url = "https://call.${matrixDomain}";
|
||||
use_exclusively = true;
|
||||
brand = "Element Call";
|
||||
};
|
||||
brand = "Element";
|
||||
default_theme = "dark";
|
||||
}}';
|
||||
'';
|
||||
};
|
||||
|
||||
locations."/" = {
|
||||
root = "${pkgs.element-web}";
|
||||
tryFiles = "$uri /index.html";
|
||||
extraConfig = ''
|
||||
add_header Cache-Control "no-cache" always;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue