!vxTmkuJzhGPsMdkAOc:transformierende-gesellschaft.org

NixOS Matrix Subsystem

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

Load older messages


SenderMessageTime
12 Mar 2022
@delroth:delroth.net@delroth:delroth.net hexa: I just noticed your RFC42 change also changed the default media store path (gated on stateVersion), should this also be documented in the release notes? 20:42:06
@delroth:delroth.net@delroth:delroth.net(I'm a crazy person who doesn't specify a stateVersion in his config so I notice these things :P)20:42:33
@hexa:lossy.networkhexasure, please add it20:48:37
@hexa:lossy.networkhexaI usually never touch stateVersion in my systems20:51:12
@delroth:delroth.net@delroth:delroth.netjust to make sure, is this also a change that was done to make our defaults closer to upstream? I can't find any discussion about it in the PR so that's the most likely explanation I have20:53:44
@delroth:delroth.net@delroth:delroth.netif so I'll document it where the max_upload_size change is documented20:54:05
@hexa:lossy.networkhexayes, it was20:54:11
@delroth:delroth.net@delroth:delroth.netcool, thanks, I'll add that to my existing docs fix PR20:54:19
@delroth:delroth.net@delroth:delroth.net(thanks for the really quick review on that one!)20:54:34
15 Mar 2022
@sumner:nevarro.spaceSumner EvansElement 1.10.7: https://github.com/NixOS/nixpkgs/pull/16427915:25:41
16 Mar 2022
@zhaofeng:zhaofeng.liZhaofeng Li joined the room.21:59:35
@tompurl:matrix.org@tompurl:matrix.org joined the room.22:01:26
18 Mar 2022
@tompurl:matrix.org@tompurl:matrix.org

Hello! I'm moving my Synapse server from a Debian host to my NixOS host. So far things are going well but I don't see any place to enter my database password, and I don't see anything in the derivation about that here:

  • https://search.nixos.org/options?channel=21.11&show=services.matrix-synapse.database_name&from=0&size=50&sort=relevance&type=packages&query=services.matrix-synapse

Does anyone know how I can configure this value?

18:14:06
@f0x:pixie.townf0x tompurl: it's under services.matrix-synapse.database_args, key password 18:17:20
@tompurl:matrix.org@tompurl:matrix.org f0x: Thank you! I figured that was it but I didn't see any docs on it. 18:17:48
@f0x:pixie.townf0xit might be useful to add to the example snippet for it, since it would be a common use18:18:28
@f0x:pixie.townf0xoh it doesn't have any example currently https://github.com/NixOS/nixpkgs/blob/nixos-21.11/nixos/modules/services/misc/matrix-synapse.nix#L396-L40818:19:19
@tompurl:matrix.org@tompurl:matrix.orgOk, now I'm getting an error stating that peer authentication isn't working with Postgres. Is there a way to tell Synapse to use TCP auth or do I need to update my pg_hba.conf file somehow?18:42:14
@tompurl:matrix.org@tompurl:matrix.org f0x: Ahh, never mind. I was able to fix that by simply adding a database_args.host param and setting it to localhost. Now everything's working. Thank you for your quick help! 19:45:59
@f0x:pixie.townf0xah nice :)19:50:53
@tompurl:matrix.org@tompurl:matrix.org

Shoot, federation isn't working. I googled how to fix this and surprise, I found https://federationtester.matrix.org , which to my surprise was also created by you f0x .

I tried both of my matrix-related domain names (destrocodpiece.wtf and matrix.destrocodpiece.wtf). The former gave me this error:

server name/.well-known result contains explicit port number: no SRV lookup done

The latter gave me this:

Get "https://98.34.0.148:8448/_matrix/key/v2/server": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Do you know where I can go from here to troubleshoot this?

21:16:13
@f0x:pixie.townf0x tompurl: what is your nginx setup like? 21:21:17
@tompurl:matrix.org@tompurl:matrix.org
{ config, lib, pkgs, ... }:

{
  services.nginx = {
    enable = true;

    # Use recommended settings
    recommendedGzipSettings = true;
    recommendedOptimisation = true;
    recommendedProxySettings = true;
    recommendedTlsSettings = true;

    # Only allow PFS-enabled ciphers with AES256
    sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";

    # Setup Nextcloud virtual host to listen on ports
    virtualHosts = {

      ### Nextcloud
      "docs.tompurl.com" = {
        ## Force HTTP redirect to HTTPS
        forceSSL = true;
        ## LetsEncrypt
        enableACME = true;
      };

      ### Synapse
      # This host section can be placed on a different host than the rest,
      # i.e. to delegate from the host being accessible as ${config.networking.domain}
      # to another host actually running the Matrix homeserver.
      "destrocodpiece.wtf" = {
        enableACME = true;
        forceSSL = true;

        locations."= /.well-known/matrix/server".extraConfig =
          let
            # use 443 instead of the default 8448 port to unite
            # the client-server and server-server port for simplicity
            server = { "m.server" = "matrix.destrocodpiece.wtf:443"; };
          in ''
            add_header Content-Type application/json;
            return 200 '${builtins.toJSON server}';
          '';
        locations."= /.well-known/matrix/client".extraConfig =
          let
            client = {
              "m.homeserver" =  { "base_url" = "https://destrocodpiece.wtf"; };
              "m.identity_server" =  { "base_url" = "https://vector.im"; };
            };
          # ACAO required to allow element-web on any URL to request this json file
          in ''
            add_header Content-Type application/json;
            add_header Access-Control-Allow-Origin *;
            return 200 '${builtins.toJSON client}';
          '';
      };

      # Reverse proxy for Matrix client-server and server-server communication
      "matrix.destrocodpiece.wtf" = {
        enableACME = true;
        forceSSL = true;

        # Or do a redirect instead of the 404, or whatever is appropriate for you.
        # But do not put a Matrix Web client here! See the Element web section below.
        locations."/".extraConfig = ''
          return 404;
        '';

        # forward all Matrix API calls to the synapse Matrix homeserver
        locations."/_matrix" = {
          proxyPass = "http://[::1]:8008"; # without a trailing /
        };
      };
    };
  };
}

21:22:56
@tompurl:matrix.org@tompurl:matrix.orgOh wait21:23:45
@tompurl:matrix.org@tompurl:matrix.orglol21:23:46
@tompurl:matrix.org@tompurl:matrix.orgNow your fantastic tool is giving me a green for "destrocodpiece.wtf"21:24:01
@f0x:pixie.townf0xheh, what changed lol21:24:15
@tompurl:matrix.org@tompurl:matrix.orgI added the "matrix" prefix to "m.server"21:24:28
@f0x:pixie.townf0xah yep, that'd fix it21:24:56
@f0x:pixie.townf0xyou could also do away with the matrix. subdomain and reverseproxy /_matrix on destrocodepiece.wtf directly, but either works21:25:35

Show newer messages


Back to Room ListRoom Version: 4