From 02b28f485a83724597c16477f4e74083af480a52 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 3 Apr 2024 23:35:26 +0200 Subject: [PATCH] add matrix via DNS entries --- nixos/machines/orbi/social-matrix.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/machines/orbi/social-matrix.nix b/nixos/machines/orbi/social-matrix.nix index f8441d4..7a794c5 100644 --- a/nixos/machines/orbi/social-matrix.nix +++ b/nixos/machines/orbi/social-matrix.nix @@ -1,13 +1,13 @@ { config, pkgs, ... }: let - # 1. create DNS entry `_matrix._tcp.ingolf-wagner.de SRV - 10 8443 matrix.ingolf-wagner.de` (8443 for federation) + # 1. create DNS entry `_matrix._tcp.ingolf-wagner.de SRV - 10 8448 matrix.ingolf-wagner.de` (8448 for federation) # 2. create DNS entry `matrix.ingolf-wagner.de A - 95.216.66.212` # 3. test with : https://federationtester.matrix.org/#ingolf-wagner.de # 4. info at : https://silvio.github.io/docker-matrix/Example.configs.html domain = "ingolf-wagner.de"; baseUrl = "https://matrix.${domain}"; - add_user_script = pkgs.writers.writeBashBin "matrix-create-user" '' + matrix_create_user = pkgs.writers.writeBashBin "matrix-create-user" '' ${pkgs.matrix-synapse}/bin/register_new_matrix_user \ -k $( ${pkgs.gojq}/bin/gojq \ --yaml-input \ @@ -39,10 +39,10 @@ let in { - networking.firewall.allowedTCPPorts = [ 80 443 8443 ]; - networking.firewall.allowedUDPPorts = [ 80 443 8443 ]; + networking.firewall.allowedTCPPorts = [ 80 443 8448 ]; + networking.firewall.allowedUDPPorts = [ 80 443 8448 ]; - environment.systemPackages = [ add_user_script ]; + environment.systemPackages = [ matrix_create_user ]; sops.secrets.matrix_shared_secret.owner = "matrix-synapse"; users.users.matrix-synapse = { @@ -162,7 +162,7 @@ in # for federation { addr = "0.0.0.0"; - port = 8443; + port = 8448; ssl = true; } ];