Expose more of the API

This commit is contained in:
Greg Hellings
2024-11-22 22:26:22 -06:00
parent b5cf3a6cad
commit c28dbeb19e
+13 -5
View File
@@ -2,7 +2,7 @@
# them by the following commands: # them by the following commands:
# nix run nixpkgs.matrix-synapse # nix run nixpkgs.matrix-synapse
# register_new_matrix_user -k "B9EoPr2WV9hzwc7uL2Sx1JmvCeKDEOGCpB0uginQcQtEH4wzRtkSIdo7lltrjSQa" http://localhost:8448 # register_new_matrix_user -k "B9EoPr2WV9hzwc7uL2Sx1JmvCeKDEOGCpB0uginQcQtEH4wzRtkSIdo7lltrjSQa" http://localhost:8448
{ config, ... }: { config, lib, ... }:
let let
domain = "${config.networking.domain}"; domain = "${config.networking.domain}";
fqdn = "matrix.${domain}"; fqdn = "matrix.${domain}";
@@ -52,10 +52,18 @@ in
forceSSL = true; forceSSL = true;
# Not the appropriate place for the chat client # Not the appropriate place for the chat client
locations."/".extraConfig = "return 404;"; locations =
(builtins.listToAttrs (
locations."/_matrix" = { builtins.map
proxyPass = "http://matrix.shire-zebra.ts.net:8448"; # Lacking the trailing / is correct (val: lib.nameValuePair "/_${val}" { proxyPass = "http://matrix.shire-zebra.ts.net:8448"; })
[
"matrix"
"synapse"
"dendrite"
]
))
// {
"/".extraConfig = "return 404;";
}; };
}; };
}; };