add matrix via DNS entries
This commit is contained in:
parent
b1e4eb8576
commit
02b28f485a
1 changed files with 6 additions and 6 deletions
|
@ -1,13 +1,13 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
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`
|
# 2. create DNS entry `matrix.ingolf-wagner.de A - 95.216.66.212`
|
||||||
# 3. test with : https://federationtester.matrix.org/#ingolf-wagner.de
|
# 3. test with : https://federationtester.matrix.org/#ingolf-wagner.de
|
||||||
# 4. info at : https://silvio.github.io/docker-matrix/Example.configs.html
|
# 4. info at : https://silvio.github.io/docker-matrix/Example.configs.html
|
||||||
|
|
||||||
domain = "ingolf-wagner.de";
|
domain = "ingolf-wagner.de";
|
||||||
baseUrl = "https://matrix.${domain}";
|
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 \
|
${pkgs.matrix-synapse}/bin/register_new_matrix_user \
|
||||||
-k $( ${pkgs.gojq}/bin/gojq \
|
-k $( ${pkgs.gojq}/bin/gojq \
|
||||||
--yaml-input \
|
--yaml-input \
|
||||||
|
@ -39,10 +39,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 8443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 8448 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 80 443 8443 ];
|
networking.firewall.allowedUDPPorts = [ 80 443 8448 ];
|
||||||
|
|
||||||
environment.systemPackages = [ add_user_script ];
|
environment.systemPackages = [ matrix_create_user ];
|
||||||
|
|
||||||
sops.secrets.matrix_shared_secret.owner = "matrix-synapse";
|
sops.secrets.matrix_shared_secret.owner = "matrix-synapse";
|
||||||
users.users.matrix-synapse = {
|
users.users.matrix-synapse = {
|
||||||
|
@ -162,7 +162,7 @@ in
|
||||||
# for federation
|
# for federation
|
||||||
{
|
{
|
||||||
addr = "0.0.0.0";
|
addr = "0.0.0.0";
|
||||||
port = 8443;
|
port = 8448;
|
||||||
ssl = true;
|
ssl = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue