From 36f7bbb00d43ccbfaa50ae2d2efedfbb3761cc91 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 29 Nov 2023 00:40:38 +0100 Subject: Migrate Nextcloud from Apache to nginx --- tw/services/matrix.scm | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'tw/services/matrix.scm') 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 -- cgit v1.2.3