summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-25 14:29:49 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-25 14:29:49 +0100
commit2c288d5ea310736a9b6088c7f04e42517b5b12a3 (patch)
tree5b47bf85d88e2648505abf35418a9e1551827bd2
parentbe35f03e74f87ab87535903650b4e8176f4a2704 (diff)
downloadnixos-2c288d5ea310736a9b6088c7f04e42517b5b12a3.tar
nixos-2c288d5ea310736a9b6088c7f04e42517b5b12a3.tar.gz
nixos-2c288d5ea310736a9b6088c7f04e42517b5b12a3.tar.bz2
nixos-2c288d5ea310736a9b6088c7f04e42517b5b12a3.tar.xz
nixos-2c288d5ea310736a9b6088c7f04e42517b5b12a3.zip
surtr: ma1sd: remove
-rw-r--r--hosts/surtr/dns/zones/li.synapse.soa3
-rw-r--r--hosts/surtr/matrix/default.nix34
-rw-r--r--hosts/surtr/postgresql.nix5
3 files changed, 1 insertions, 41 deletions
diff --git a/hosts/surtr/dns/zones/li.synapse.soa b/hosts/surtr/dns/zones/li.synapse.soa
index 50c341a7..1a7c57ea 100644
--- a/hosts/surtr/dns/zones/li.synapse.soa
+++ b/hosts/surtr/dns/zones/li.synapse.soa
@@ -1,7 +1,7 @@
1$ORIGIN synapse.li. 1$ORIGIN synapse.li.
2$TTL 3600 2$TTL 3600
3@ IN SOA ns.yggdrasil.li. root.yggdrasil.li. ( 3@ IN SOA ns.yggdrasil.li. root.yggdrasil.li. (
4 2022022502 ; serial 4 2022022503 ; serial
5 10800 ; refresh 5 10800 ; refresh
6 3600 ; retry 6 3600 ; retry
7 604800 ; expire 7 604800 ; expire
@@ -22,7 +22,6 @@ $TTL 3600
22@ IN TXT "v=spf1 redirect=yggdrasil.li" 22@ IN TXT "v=spf1 redirect=yggdrasil.li"
23 23
24_matrix._tcp IN SRV 5 0 443 synapse.li. 24_matrix._tcp IN SRV 5 0 443 synapse.li.
25_matrix-identity._tcp IN SRV 5 0 443 synapse.li.
26 25
27element IN CNAME synapse.li. 26element IN CNAME synapse.li.
28_acme-challenge.element IN NS ns.yggdrasil.li. 27_acme-challenge.element IN NS ns.yggdrasil.li.
diff --git a/hosts/surtr/matrix/default.nix b/hosts/surtr/matrix/default.nix
index b07f9fe2..53b0bdc4 100644
--- a/hosts/surtr/matrix/default.nix
+++ b/hosts/surtr/matrix/default.nix
@@ -38,9 +38,6 @@
38 "/run/credentials/matrix-synapse.service/registration.yaml" 38 "/run/credentials/matrix-synapse.service/registration.yaml"
39 "/run/credentials/matrix-synapse.service/turn-secret.yaml" 39 "/run/credentials/matrix-synapse.service/turn-secret.yaml"
40 ]; 40 ];
41 extraConfig = ''
42 default_identity_server: https://synapse.li
43 '';
44 }; 41 };
45 sops.secrets."matrix-synapse-registration.yaml" = { 42 sops.secrets."matrix-synapse-registration.yaml" = {
46 format = "binary"; 43 format = "binary";
@@ -243,36 +240,5 @@
243 owner = "turnserver"; 240 owner = "turnserver";
244 group = "turnserver"; 241 group = "turnserver";
245 }; 242 };
246
247 services.mxisd = {
248 enable = true;
249 matrix.domain = "synapse.li";
250 server = {
251 name = "localhost";
252 port = 8090;
253 };
254 extraConfig = {
255 matrix = {
256 v1 = true;
257 v2 = true;
258 };
259 hashing = {
260 enabled = true;
261 rotationPolicy = "per_requests";
262 hashStorageType = "sql";
263 algorithms = ["sha256"];
264 requests = 10;
265 };
266 server.publicUrl = "https://synapse.li";
267 storage = {
268 backend = "postgresql";
269 provider.postgresql = {
270 database = "//file%3A%2F%2F%2Frun%2Fpostgresql%2F.s.PGSQL.5432/mxisd?socketFactory=org.newsclub.net.unix.AFUNIXSocketFactory%24URIScheme";
271 };
272 };
273 forward.servers = ["matrix-org"];
274 invite.resolution.recursive = false;
275 };
276 };
277 }; 243 };
278} 244}
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix
index e622f4e9..a34bc675 100644
--- a/hosts/surtr/postgresql.nix
+++ b/hosts/surtr/postgresql.nix
@@ -9,11 +9,6 @@
9 CREATE USER "matrix-synapse"; 9 CREATE USER "matrix-synapse";
10 GRANT ALL PRIVILEGES ON DATABASE "matrix-synapse" TO "matrix-synapse"; 10 GRANT ALL PRIVILEGES ON DATABASE "matrix-synapse" TO "matrix-synapse";
11 GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "matrix-synapse"; 11 GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "matrix-synapse";
12
13 CREATE DATABASE "mxisd" WITH TEMPLATE "template0" ENCODING "UTF8" LOCALE "C";
14 CREATE USER "mxisd";
15 GRANT ALL PRIVILEGES ON DATABASE "mxisd" TO "mxisd";
16 GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "mxisd";
17 ''; 12 '';
18 }; 13 };
19 }; 14 };