matrix: initialise DB if missing
This commit is contained in:
parent
5e20edc46e
commit
b34a44098f
11
matrix.nix
11
matrix.nix
@ -135,9 +135,18 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Use the Postrges database
|
### Database
|
||||||
services.postgresql.enable = true;
|
services.postgresql.enable = true;
|
||||||
|
|
||||||
|
# Create database on the first run
|
||||||
|
services.postgresql.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";
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
# Handles users behind a NAT,
|
# Handles users behind a NAT,
|
||||||
# needed for reliable VoIP.
|
# needed for reliable VoIP.
|
||||||
|
Loading…
Reference in New Issue
Block a user