summaryrefslogtreecommitdiff
path: root/deployment/services/matrix.scm
blob: c418f31946f1787bb6ed3cb64bea2ca8535e15f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(define-module (deployment services matrix)
  #:use-module (gnu services)
  #:use-module (guix gexp)
  #:use-module (sovereign services matrix)
  #:use-module ((gnu packages matrix)
                #:prefix gnu:packages:matrix:)
  #:export (matrix-service-aisaka
            matrix-service-rakan))

(define matrix-service-aisaka
  (service matrix-service-type))

(define homeserver-configuration-file-rakan
  (mixed-text-file "homeserver.yaml"
                   "# Configuration file for Synapse.\n"
                   "#\n"
                   "# This is a YAML file: see [1] for a quick introduction. Note in particular\n"
                   "# that *indentation is important*: all the elements of a list or dictionary\n"
                   "# should have the same indentation."
                   "#\n"
                   "# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html\n"
                   "# For more information on how to configura Synapse, including a complete accounting of\n"
                   "# each option, go to docs/usage/configuratoin/config_documentation.md or\n"
                   "# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html\n"
                   "server_name: \"marekpasnikowski.pl\"\n"
                   "pid_file: /home/matrix/data/homeserver.pid\n"
                   "listeners:\n"
                   "  - port: 8008\n"
                   "    tls: false\n"
                   "    type: http\n"
                   "    x_forwarded: true\n"
                   "    bind_addresses: ['::1', '127.0.0.1']\n"
                   "    resources:\n"
                   "      - names: [client]\n"
                   "        compress: false\n"
                   "database:\n"
                   "  name: sqlite3\n"
                   "  args:\n"
                   "    database: /home/matrix/data/homeserver.db\n"
                   "log_config: \"/home/matrix/keys/marekpasnikowski.pl.log.config\"\n"
                   "media_store_path: /home/matrix/data/media_store\n"
                   "registration_shared_secret: /home/matrix/keys/registration_shared_secret\n"
                   "report_stats: false\n"
                   "macaroon_secret_key: /home/matrix/keys/macaroon_secret_key\n"
                   "form_secret: /home/matrix/keys/form_secret\n"
                   "signing_key_path: \"/home/matrix/keys/marekpasnikowski.pl.signing.key\"\n"
                   "trusted_key_servers:\n"
                   "  - server_name: \"matrix.org\"\n"
                   "\n"
                   "\n"
                   "# vim:ft=yaml\n"))

(define matrix-configuration-rakan
  (matrix-configuration
   (package gnu:packages:matrix:synapse)
   (file    homeserver-configuration-file-rakan)))

(define matrix-service-rakan
  (service matrix-service-type
           matrix-configuration-rakan))