aboutsummaryrefslogtreecommitdiff
path: root/nixos/tests/matrix-synapse.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-02-18 14:50:19 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2020-03-15 17:09:51 +0100
commit8be61f7a36f403c15e1a242e129be7375aafaa85 (patch)
treeb114096d0ed81bc33abedcee96079dc412e9afff /nixos/tests/matrix-synapse.nix
parent500375e338098e26f23f962f41ad10f4b317a50f (diff)
matrix-synapse: 1.9.1 -> 1.11.1
https://github.com/matrix-org/synapse/releases/tag/v1.10.0 https://github.com/matrix-org/synapse/releases/tag/v1.10.1 https://github.com/matrix-org/synapse/releases/tag/v1.11.0 https://github.com/matrix-org/synapse/releases/tag/v1.11.1
Diffstat (limited to 'nixos/tests/matrix-synapse.nix')
-rw-r--r--nixos/tests/matrix-synapse.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/nixos/tests/matrix-synapse.nix b/nixos/tests/matrix-synapse.nix
index fca53009083a..f3623aa3c094 100644
--- a/nixos/tests/matrix-synapse.nix
+++ b/nixos/tests/matrix-synapse.nix
@@ -35,12 +35,31 @@ in {
nodes = {
# Since 0.33.0, matrix-synapse doesn't allow underscores in server names
- serverpostgres = args: {
+ serverpostgres = { pkgs, ... }: {
services.matrix-synapse = {
enable = true;
database_type = "psycopg2";
tls_certificate_path = "${cert}";
tls_private_key_path = "${key}";
+ database_args = {
+ password = "synapse";
+ };
+ };
+ services.postgresql = {
+ enable = true;
+
+ # The database name and user are configured by the following options:
+ # - services.matrix-synapse.database_name
+ # - services.matrix-synapse.database_user
+ #
+ # The values used here represent the default values of the module.
+ initialScript = pkgs.writeText "synapse-init.sql" ''
+ CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
+ CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
+ TEMPLATE template0
+ LC_COLLATE = "C"
+ LC_CTYPE = "C";
+ '';
};
};