summaryrefslogtreecommitdiff
path: root/hosts/surtr/matrix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/surtr/matrix.nix')
-rw-r--r--hosts/surtr/matrix.nix26
1 files changed, 25 insertions, 1 deletions
diff --git a/hosts/surtr/matrix.nix b/hosts/surtr/matrix.nix
index 315490cb..e3373df6 100644
--- a/hosts/surtr/matrix.nix
+++ b/hosts/surtr/matrix.nix
@@ -68,7 +68,27 @@
68 add_header Strict-Transport-Security "max-age=63072000" always; 68 add_header Strict-Transport-Security "max-age=63072000" always;
69 ''; 69 '';
70 }; 70 };
71 in { "/_matrix" = synapse; "/_synapse/client" = synapse; }; 71 in {
72 "/_matrix" = synapse;
73 "/_synapse/client" = synapse;
74 "/".return = "301 https://element.synapse.li$request_uri";
75 };
76 };
77
78 virtualHosts."element.synapse.li" = {
79 forceSSL = true;
80 sslCertificate = "/run/credentials/nginx.service/element.synapse.li.pem";
81 sslCertificateKey = "/run/credentials/nginx.service/element.synapse.li.key.pem";
82 sslTrustedCertificate = "/run/credentials/nginx.service/element.synapse.li.chain.pem";
83
84 root = pkgs.element-web.override {
85 conf = {
86 default_server_config."m.homeserver" = {
87 "base_url" = "https://synapse.li";
88 "server_name" = "synapse.li";
89 };
90 };
91 };
72 }; 92 };
73 }; 93 };
74 94
@@ -78,6 +98,10 @@
78 "synapse.li.key.pem:${config.security.acme.certs."synapse.li".directory}/key.pem" 98 "synapse.li.key.pem:${config.security.acme.certs."synapse.li".directory}/key.pem"
79 "synapse.li.pem:${config.security.acme.certs."synapse.li".directory}/fullchain.pem" 99 "synapse.li.pem:${config.security.acme.certs."synapse.li".directory}/fullchain.pem"
80 "synapse.li.chain.pem:${config.security.acme.certs."synapse.li".directory}/chain.pem" 100 "synapse.li.chain.pem:${config.security.acme.certs."synapse.li".directory}/chain.pem"
101
102 "element.synapse.li.key.pem:${config.security.acme.certs."element.synapse.li".directory}/key.pem"
103 "element.synapse.li.pem:${config.security.acme.certs."element.synapse.li".directory}/fullchain.pem"
104 "element.synapse.li.chain.pem:${config.security.acme.certs."element.synapse.li".directory}/chain.pem"
81 ]; 105 ];
82 }; 106 };
83 }; 107 };