aboutsummaryrefslogtreecommitdiff
path: root/tw/services/matrix.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-11-29 00:40:38 +0100
committerTimo Wilken2023-11-29 00:45:52 +0100
commit36f7bbb00d43ccbfaa50ae2d2efedfbb3761cc91 (patch)
tree5cc7d595027b73157288616d30477fabfe3e715c /tw/services/matrix.scm
parentd5d9951c7675f29931be3ce2a6c79bb6498914d6 (diff)
Migrate Nextcloud from Apache to nginx
Diffstat (limited to 'tw/services/matrix.scm')
-rw-r--r--tw/services/matrix.scm25
1 files changed, 6 insertions, 19 deletions
diff --git a/tw/services/matrix.scm b/tw/services/matrix.scm
index db21f172..6b184f49 100644
--- a/tw/services/matrix.scm
+++ b/tw/services/matrix.scm
@@ -1,27 +1,14 @@
(define-module (tw services matrix)
#:use-module (gnu services)
- #:use-module (gnu services certbot)
- #:use-module (gnu services web)
- #:use-module (tw services))
+ #:use-module (tw services web))
(define-public %matrix-services
- (list (simple-service 'synapse-certificates certbot-service-type
- (list (certificate-configuration
+ (list (simple-service 'synapse-reverse-proxy https-reverse-proxy-service-type
+ ;; Synapse can't access certbot certs, but nginx can, so proxy HTTPS
+ ;; access through. Also, it's good to have Synapse available on :443.
+ (list (https-reverse-proxy-configuration
(domains '("matrix.twilken.net"))
- (deploy-hook %httpd-cert-deploy-hook))))
-
- (simple-service 'synapse-https-proxy httpd-service-type
- ;; Synapse can't access certbot certs, but Apache/httpd
- ;; can, so proxy HTTPS access through. It's good to have
- ;; Synapse available on port 443 anyway.
- (list (httpd-virtualhost "*:443" (list "\
-# Redirect to Synapse, to avoid having to specify its port number in Matrix clients.
-ServerName matrix.twilken.net
-SSLEngine on
-SSLCertificateFile \"/etc/letsencrypt/live/matrix.twilken.net/fullchain.pem\"
-SSLCertificateKeyFile \"/etc/letsencrypt/live/matrix.twilken.net/privkey.pem\"
-ProxyPass \"/\" \"https://127.0.0.1:48448/\"
-"))))
+ (destination-port 48448))))
;; TODO: Postgres for Synapse
;; (service postgresql-service-type