!vxTmkuJzhGPsMdkAOc:transformierende-gesellschaft.org

NixOS Matrix Subsystem

142 Members
Coordination and discussion about the matrix subsystem in NixOS - https://nixos.wiki/wiki/Matrix72 Servers

Load older messages


SenderMessageTime
7 Feb 2022
@hexa:lossy.networkhexaand that still did not work, so I went back to the stock module20:22:30
@dandellion:dodsorf.asDandellionquite curious20:22:43
@hexa:lossy.networkhexabut sure, let me give that a shot20:22:43
@hexa:lossy.networkhexahttps://paste.lossy.network/B420:23:45
@hexa:lossy.networkhexathat was my configuration, I commented out the nginx locations when I noticed people didn't see me20:24:19
@dandellion:dodsorf.asDandellion
{ 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:lossy.networkhexa
  signing_key_path = "${cfg.dataDir}/homeserver.signing.key";
20:26:41
@hexa:lossy.networkhexaI stumbled over that as well πŸ˜€20:26:47
@hexa:lossy.networkhexa Dandellion: metrics resource on the federation sender?! 20:29:26
@dandellion:dodsorf.asDandellionsure, it lets you pull stuff in from prometheus from the worker20:29:57
@hexa:lossy.networkhexaI have that one the main instance on a separate port20:30:28
@hexa:lossy.networkhexado I need that per worker?20:30:35
@dandellion:dodsorf.asDandellion(I'm not sure)20:30:43
@hexa:lossy.networkhexaok20:30:47
@dandellion:dodsorf.asDandellionThey didnt seem to show up in the grafana dashboard without adding them as endpoints20:31:01
@dandellion:dodsorf.asDandellion you need to set federation_sender_instances to get your federation senders to work though 20:31:18
@dandellion:dodsorf.asDandellionso that explains that I think20:31:26
@hexa:lossy.networkhexayep, I saw that20:31:29
@dandellion:dodsorf.asDandellionI dont see anything obviously wrong for the rest of the workers20:34:05
@dandellion:dodsorf.asDandellionthe planℒ️ was to make a more opinionated module that would make this stuff easier but,,, it never ended up happening 20:36:52
@hexa:lossy.networkhexathe fact that https://github.com/NixOS/nixpkgs/pull/120260 didn't happen yet is not encouraging20:38:12
@hexa:lossy.networkhexamigrating to workers again20:38:57
@hexa:lossy.networkhexahi?20:39:17
@fadenb:utzutzutz.netfadenbπŸ‘‹20:39:22
@fadenb:utzutzutz.netfadenb"hi?" received20:39:26
@hexa:lossy.networkhexawow πŸ˜€20:39:28
@hexa:lossy.networkhexaπŸ‘‹20:39:35
@dandellion:dodsorf.asDandellionI guess that makes it 4 deployments then πŸ™ˆ20:40:05
@fadenb:utzutzutz.netfadenbLet's see how sleepy I am today, perhaps later it will be 5 :p20:40:20
@hexa:lossy.networkhexasure, poke us if you need help20:40:32

Show newer messages


Back to Room ListRoom Version: 4