mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #221318 from mweinelt/synapse-extras
nixos/matrix-synapse: Allow passing extras, discover extras from config
This commit is contained in:
commit
a471325eaf
9 changed files with 219 additions and 45 deletions
|
@ -65,7 +65,7 @@ in {
|
|||
|
||||
nodes = {
|
||||
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
|
||||
serverpostgres = { pkgs, nodes, ... }: let
|
||||
serverpostgres = { pkgs, nodes, config, ... }: let
|
||||
mailserverIP = nodes.mailserver.config.networking.primaryIPAddress;
|
||||
in
|
||||
{
|
||||
|
@ -77,6 +77,11 @@ in {
|
|||
name = "psycopg2";
|
||||
args.password = "synapse";
|
||||
};
|
||||
redis = {
|
||||
enabled = true;
|
||||
host = "localhost";
|
||||
port = config.services.redis.servers.matrix-synapse.port;
|
||||
};
|
||||
tls_certificate_path = "${cert}";
|
||||
tls_private_key_path = "${key}";
|
||||
registration_shared_secret = registrationSharedSecret;
|
||||
|
@ -107,6 +112,11 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
services.redis.servers.matrix-synapse = {
|
||||
enable = true;
|
||||
port = 6380;
|
||||
};
|
||||
|
||||
networking.extraHosts = ''
|
||||
${mailserverIP} ${mailerDomain}
|
||||
'';
|
||||
|
@ -208,6 +218,9 @@ in {
|
|||
serverpostgres.wait_until_succeeds(
|
||||
"curl --fail -L --cacert ${ca_pem} https://localhost:8448/"
|
||||
)
|
||||
serverpostgres.wait_until_succeeds(
|
||||
"journalctl -u matrix-synapse.service | grep -q 'Connected to redis'"
|
||||
)
|
||||
serverpostgres.require_unit_state("postgresql.service")
|
||||
serverpostgres.succeed("register_new_matrix_user -u ${testUser} -p ${testPassword} -a -k ${registrationSharedSecret} https://localhost:8448/")
|
||||
serverpostgres.succeed("obtain-token-and-register-email")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue