about summary refs log tree commit diff
path: root/modules/nixos/matrix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-05-06 18:55:06 +0300
committerAzat Bahawi <azat@bahawi.net>2023-05-06 18:55:06 +0300
commit8f7371998f813857f25afef4160075665f924ab7 (patch)
tree7bffc723cbed32ab8aacae2feaf60de039bd3ff3 /modules/nixos/matrix
parent2023-05-04 (diff)
2023-05-06
Diffstat (limited to '')
-rw-r--r--modules/nixos/matrix/dendrite.nix14
-rw-r--r--modules/nixos/matrix/synapse.nix14
2 files changed, 12 insertions, 16 deletions
diff --git a/modules/nixos/matrix/dendrite.nix b/modules/nixos/matrix/dendrite.nix
index bd19f8b..d9c4914 100644
--- a/modules/nixos/matrix/dendrite.nix
+++ b/modules/nixos/matrix/dendrite.nix
@@ -52,20 +52,18 @@ in {
               extraConfig = ''
                 add_header Content-Type application/json;
               '';
-              return = "200 '${
-                generators.toJSON {} {"m.server" = "${cfg.domain}:443";}
-              }'";
+              return = "200 '${generators.toJSON {} {
+                "m.server" = "${cfg.domain}:443";
+              }}'";
             };
             "= /.well-known/matrix/client" = {
               extraConfig = ''
                 add_header Content-Type application/json;
                 add_header Access-Control-Allow-Origin *;
               '';
-              return = "200 '${
-                generators.toJSON {} {
-                  "m.homeserver".base_url = "https://${cfg.domain}";
-                }
-              }'";
+              return = "200 '${generators.toJSON {} {
+                "m.homeserver".base_url = "https://${cfg.domain}";
+              }}'";
             };
           };
         };
diff --git a/modules/nixos/matrix/synapse.nix b/modules/nixos/matrix/synapse.nix
index a74ebb4..40595a0 100644
--- a/modules/nixos/matrix/synapse.nix
+++ b/modules/nixos/matrix/synapse.nix
@@ -33,20 +33,18 @@ in {
               extraConfig = ''
                 add_header Content-Type application/json;
               '';
-              return = "200 '${
-                generators.toJSON {} {"m.server" = "${cfg.domain}:443";}
-              }'";
+              return = "200 '${generators.toJSON {} {
+                "m.server" = "${cfg.domain}:443";
+              }}'";
             };
             "= /.well-known/matrix/client" = {
               extraConfig = ''
                 add_header Content-Type application/json;
                 add_header Access-Control-Allow-Origin *;
               '';
-              return = "200 '${
-                generators.toJSON {} {
-                  "m.homeserver".base_url = "https://${cfg.domain}";
-                }
-              }'";
+              return = "200 '${generators.toJSON {} {
+                "m.homeserver".base_url = "https://${cfg.domain}";
+              }}'";
             };
           };
         };

Consider giving Nix/NixOS a try! <3