forked from CCCHH/nix-infra
Configure Matrix host
Co-authored-by: julian <julian@jsts.xyz>
This commit is contained in:
parent
3d8f0fa040
commit
58d529d0ba
7 changed files with 203 additions and 0 deletions
17
config/hosts/matrix/postgresql.nix
Normal file
17
config/hosts/matrix/postgresql.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
|
||||
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";
|
||||
'';
|
||||
|
||||
dataDir = "/mnt/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue