point discord bridge at the main synapse listener

This commit is contained in:
Daniel Lovbrotte Olsen 2022-12-12 14:18:40 +01:00
parent 423b0fb29b
commit c0a2ee7ab0
2 changed files with 10 additions and 8 deletions

12
flake.lock generated
View File

@ -18,11 +18,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1670543317,
"narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=",
"lastModified": 1670790647,
"narHash": "sha256-9a8b63M7CHXvbGA1AXGhCkH5BkYAaXiBX3LP8LBlnNA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7a6a010c3a1d00f8470a5ca888f2f927f1860a19",
"rev": "5f3e18f6cc1df481cba325a0916994e39b55e4e9",
"type": "github"
},
"original": {
@ -79,11 +79,11 @@
},
"unstable": {
"locked": {
"lastModified": 1670600004,
"narHash": "sha256-/Lg8ibSR96OuYo50lDXEwyN+D1CmghphnBYn4sF5264=",
"lastModified": 1670837426,
"narHash": "sha256-VGm7k7R+zxZa5oZXGT/79SUlihzFxeWVcPmIn0k1y+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "26e9ac3828eaf58015c05714e6f0387e98141fe7",
"rev": "f277f5a27a877f9ceaaeecc8161c9f6d3b7f4f7c",
"type": "github"
},
"original": {

View File

@ -1,4 +1,4 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.services.mx-puppet-discord;
@ -21,7 +21,9 @@ in
bridge = {
bindAddress = "localhost";
domain = "pvv.ntnu.no";
homeserverUrl = config.services.matrix-synapse-next.settings.public_baseurl;
# systemd-resolved reads hosts and redirects matrix->jokum->127.0.0.2 which nginx doesnt listen to
# this line points the bridge at whatever the ip for the main synapse listener is
homeserverUrl = "http://${lib.head (lib.attrNames config.services.nginx.upstreams.synapse_master.servers)}";
};
provisioning.whitelist = [ "@dandellion:dodsorf\\.as" "@danio:pvv\\.ntnu\\.no"];
relay.whitelist = [ ".*" ];