7 Feb 2022 |
hexa | and that still did not work, so I went back to the stock module | 20:22:30 |
Dandellion | quite curious | 20:22:43 |
hexa | but sure, let me give that a shot | 20:22:43 |
hexa | https://paste.lossy.network/B4 | 20:23:45 |
hexa | that was my configuration, I commented out the nginx locations when I noticed people didn't see me | 20:24:19 |
Dandellion | { config, lib, pkgs, ... }:
let
cfg = config.services.matrix-synapse-next;
in
{
imports = [ ./synapse-module ];
services.matrix-synapse-next = {
enable = true;
package = pkgs.matrix-synapse;
dataDir = "/data/synapse";
enableMainSynapse = true;
settings = {
server_name = "pvv.ntnu.no";
public_baseurl = "https://matrix.pvv.ntnu.no";
database = {
name = "psycopg2";
args = {
host = "localhost";
user = "synapse";
password = "synapse";
dbname = "synapse";
};
};
listeners = [
{
bind_addresses = ["127.0.1.2"]; port = 8008; tls = false; type = "http";
x_forwarded = true;
resources = [
{ names = ["client"]; compress = true;}
{ names = ["federation"]; compress = false;}
];
}
{
bind_addresses = ["127.0.1.2"]; port = 8010; tls = false; type = "http";
resources = [
{ names = ["metrics"]; compress = false; }
];
}
{
bind_addresses = [ "127.0.1.2"]; port = 9008; tls = false; type = "http";
resources = [
{ names = ["replication"]; compress = false; }
];
}
];
enable_metrics = true;
use_presence = true;
password_config.enabled = lib.mkForce false;
enable_registration = false;
signing_key_path = "${cfg.dataDir}/homeserver.signing.key";
media_store_path = "${cfg.dataDir}/media";
federation_sender_instances = [
"federation_sender1"
];
redis = {
enabled = true;
};
};
workers = {
"federation_sender1" = {
settings = {
worker_app = "synapse.app.federation_sender";
worker_replication_host = "127.0.1.2";
worker_replication_http_port = 9008;
worker_listeners = [
{
bind_addresses = ["127.0.1.10"]; port = 8010; tls = false; type = "http";
resources = [
{ names = ["metrics"]; compress = false; }
];
}
];
};
};
"federation_reciever1" = {
settings = {
worker_app = "synapse.app.generic_worker";
worker_replication_host = "127.0.1.2";
worker_replication_http_port = 9008;
worker_listeners = [
{
bind_addresses = ["127.0.1.11"]; port = 8010; tls = false; type = "http";
resources = [
{ names = ["metrics"]; compress = false; }
];
}
{
bind_addresses = ["127.0.1.11"]; port = 8011; tls = false; type = "http";
resources = [
{ names = ["federation"]; compress = false; }
];
}
];
};
};
};
};
services.redis.enable = true;
services.nginx.virtualHosts."matrix.pvv.ntnu.no" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.1.2:8008";
};
locations."/_matrix/federation" = {
proxyPass = "http://127.0.1.11:8011";
};
};
}
| 20:25:59 |
hexa |
signing_key_path = "${cfg.dataDir}/homeserver.signing.key";
| 20:26:41 |
hexa | I stumbled over that as well π | 20:26:47 |
hexa | Dandellion: metrics resource on the federation sender?! | 20:29:26 |
Dandellion | sure, it lets you pull stuff in from prometheus from the worker | 20:29:57 |
hexa | I have that one the main instance on a separate port | 20:30:28 |
hexa | do I need that per worker? | 20:30:35 |
Dandellion | (I'm not sure) | 20:30:43 |
hexa | ok | 20:30:47 |
Dandellion | They didnt seem to show up in the grafana dashboard without adding them as endpoints | 20:31:01 |
Dandellion | you need to set federation_sender_instances to get your federation senders to work though | 20:31:18 |
Dandellion | so that explains that I think | 20:31:26 |
hexa | yep, I saw that | 20:31:29 |
Dandellion | I dont see anything obviously wrong for the rest of the workers | 20:34:05 |
Dandellion | the planβ’οΈ was to make a more opinionated module that would make this stuff easier but,,, it never ended up happening | 20:36:52 |
hexa | the fact that https://github.com/NixOS/nixpkgs/pull/120260 didn't happen yet is not encouraging | 20:38:12 |
hexa | migrating to workers again | 20:38:57 |
hexa | hi? | 20:39:17 |
fadenb | π | 20:39:22 |
fadenb | "hi?" received | 20:39:26 |
hexa | wow π | 20:39:28 |
hexa | π | 20:39:35 |
Dandellion | I guess that makes it 4 deployments then π | 20:40:05 |
fadenb | Let's see how sleepy I am today, perhaps later it will be 5 :p | 20:40:20 |
hexa | sure, poke us if you need help | 20:40:32 |