diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-24 21:20:44 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-24 21:20:44 +0100 |
commit | a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54 (patch) | |
tree | 81c528fa3b1001eabbab0f95f4c6ff2b0f8a4d95 /hosts/surtr/matrix.nix | |
parent | 522c8a27dbde0d337c40aa05597c43df05f5ff8f (diff) | |
download | nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.gz nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.bz2 nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.xz nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.zip |
surtr: synapse.li: ...
Diffstat (limited to 'hosts/surtr/matrix.nix')
-rw-r--r-- | hosts/surtr/matrix.nix | 26 |
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 | }; |