matrix: initialise DB if missing
This commit is contained in:
parent
45d5fe7216
commit
d6a8fccdad
11
matrix.nix
11
matrix.nix
@ -135,9 +135,18 @@ in
|
||||
};
|
||||
|
||||
|
||||
# Use the Postrges database
|
||||
### Database
|
||||
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,
|
||||
# needed for reliable VoIP.
|
||||
|
Loading…
Reference in New Issue
Block a user