From 1f6fc8736367986b5386af188c0d7ee5ae5af8c1 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 22 May 2021 23:17:27 +0000 Subject: [PATCH] bvm-matrix: add element --- ops/nixos/bvm-matrix/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ops/nixos/bvm-matrix/default.nix b/ops/nixos/bvm-matrix/default.nix index 5e16bec7c7..138029372c 100644 --- a/ops/nixos/bvm-matrix/default.nix +++ b/ops/nixos/bvm-matrix/default.nix @@ -94,6 +94,26 @@ in { locations."/".return = "301 https://element.zxcvbnm.ninja$request_uri"; locations."/_matrix".proxyPass = "http://[::1]:8008"; }; + "element.zxcvbnm.ninja" = { + forceSSL = true; + useACMEHost = "matrix.zxcvbnm.ninja"; + extraConfig = '' + add_header X-Frame-Options SAMEORIGIN; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header Content-Security-Policy "frame-ancestors 'none'"; + ''; + + root = pkgs.element-web.override { + conf = { + default_server_config."m.homeserver" = { + base_url = "zxcvbnm.ninja"; + server_name = "matrix.zxcvbnm.ninja"; + }; + disable_guests = true; + }; + }; + }; }; }; services.matrix-synapse = {