2024-01-06 01:19:35 +01:00
|
|
|
|
# SPDX-FileCopyrightText: 2021-2023 Simon Bruder <simon@sbruder.de>
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
|
2021-02-28 16:16:06 +01:00
|
|
|
|
{ lib, pkgs, ... }:
|
2024-08-08 21:26:14 +02:00
|
|
|
|
|
2021-02-28 16:16:06 +01:00
|
|
|
|
{
|
|
|
|
|
services.nginx.virtualHosts."chat.sbruder.de" = {
|
|
|
|
|
enableACME = true;
|
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
|
|
root = pkgs.element-web;
|
|
|
|
|
|
2024-08-08 21:26:14 +02:00
|
|
|
|
# https://github.com/vector-im/element-web#configuration-best-practices
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
add_header X-Content-Type-Options nosniff;
|
|
|
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
|
add_header Content-Security-Policy "frame-ancestors 'self'";
|
|
|
|
|
'';
|
2021-02-28 16:16:06 +01:00
|
|
|
|
|
|
|
|
|
# nixpkgs’s override mechanism doesn’t allow overriding of all options
|
|
|
|
|
locations."=/config.chat.sbruder.de.json".alias = pkgs.writeText "config.chat.sbruder.de.json" (lib.generators.toJSON { } {
|
|
|
|
|
default_server_config = {
|
|
|
|
|
"m.homeserver" = {
|
|
|
|
|
base_url = "https://matrix.sbruder.de";
|
|
|
|
|
server_name = "matrix.sbruder.de";
|
|
|
|
|
};
|
|
|
|
|
};
|
2023-12-24 12:37:34 +01:00
|
|
|
|
show_labs_settings = true;
|
2021-02-28 16:16:06 +01:00
|
|
|
|
branding = {
|
2023-12-24 12:37:34 +01:00
|
|
|
|
auth_footer_links = [ ];
|
2021-02-28 16:16:06 +01:00
|
|
|
|
};
|
|
|
|
|
piwik = false;
|
2023-12-24 12:37:34 +01:00
|
|
|
|
default_country_code = "DE";
|
|
|
|
|
setting_defaults = {
|
2021-02-28 16:16:06 +01:00
|
|
|
|
"UIFeature.feedback" = false;
|
|
|
|
|
"UIFeature.shareSocial" = false;
|
|
|
|
|
"UIFeature.identityServer" = false;
|
|
|
|
|
"UIFeature.thirdPartyId" = false;
|
|
|
|
|
};
|
|
|
|
|
disable_custom_urls = true;
|
|
|
|
|
disable_guests = true;
|
|
|
|
|
disable_3pid_login = true;
|
2023-12-24 12:37:34 +01:00
|
|
|
|
desktop_builds.available = false;
|
2021-02-28 16:16:06 +01:00
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|