Use postgresql as database
This commit is contained in:
parent
1c0fa7606b
commit
eaf6f0d54a
1 changed files with 16 additions and 1 deletions
|
|
@ -12,7 +12,11 @@ lib.mkIf cfg.enable {
|
|||
server_name = cfg.domain;
|
||||
public_baseurl = "https://${cfg.fqdn}";
|
||||
|
||||
database.name = "sqlite3";
|
||||
database = {
|
||||
name = "psycopg2";
|
||||
args.user = "matrix-synapse";
|
||||
args.database = "matrix-synapse";
|
||||
};
|
||||
|
||||
listeners = lib.singleton {
|
||||
inherit (cfg.synapse) port;
|
||||
|
|
@ -103,6 +107,17 @@ lib.mkIf cfg.enable {
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [
|
||||
config.services.matrix-synapse.settings.database.args.database
|
||||
];
|
||||
ensureUsers = [{
|
||||
name = config.services.matrix-synapse.settings.database.args.user;
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.matrix-synapse = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue