Force Dendrite into postgres
This commit is contained in:
@@ -37,5 +37,6 @@
|
|||||||
bind
|
bind
|
||||||
graphviz
|
graphviz
|
||||||
nix-du
|
nix-du
|
||||||
|
pgloader
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
checkConfig = true;
|
checkConfig = true;
|
||||||
ensureDatabases = [
|
ensureDatabases = [
|
||||||
"dendrite"
|
"dendrite"
|
||||||
"forgejo"
|
|
||||||
"monica"
|
|
||||||
"nextcloud"
|
"nextcloud"
|
||||||
];
|
];
|
||||||
#initialScript = pkgs.writeText "create-matrix-db.sql" ''
|
#initialScript = pkgs.writeText "create-matrix-db.sql" ''
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
let
|
let
|
||||||
domain = "${config.networking.domain}";
|
domain = "${config.networking.domain}";
|
||||||
fqdn = "matrix.${domain}";
|
fqdn = "matrix.${domain}";
|
||||||
|
conn = "postgresql:///dendrite?sslmode=disable&host=/run/postgresql";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -89,10 +90,25 @@ return 200 '${builtins.toJSON client}';
|
|||||||
environmentFile = "/run/agenix/dendrite";
|
environmentFile = "/run/agenix/dendrite";
|
||||||
httpPort = 8448;
|
httpPort = 8448;
|
||||||
# Identify ourselves as the root of our own domain
|
# Identify ourselves as the root of our own domain
|
||||||
settings = {
|
settings = (
|
||||||
|
(builtins.listToAttrs (
|
||||||
|
(map (x: { name = x; value = { database.connection_string = conn; }; }) [
|
||||||
|
"app_service_api"
|
||||||
|
"federation_api"
|
||||||
|
"key_server"
|
||||||
|
"media_api"
|
||||||
|
"mscs"
|
||||||
|
"relay_api"
|
||||||
|
"room_server"
|
||||||
|
"sync_api"
|
||||||
|
])
|
||||||
|
) ) //
|
||||||
|
{
|
||||||
|
user_api.account_database.connection_string = conn;
|
||||||
|
user_api.device_database.connection_string = conn;
|
||||||
global = {
|
global = {
|
||||||
database.args = {
|
database = {
|
||||||
connection_string = "postgresql://dendrite@localhost/dendrite?sslmode=disable";
|
connection_string = conn;
|
||||||
max_open_conns = 90;
|
max_open_conns = 90;
|
||||||
max_idle_conns = 5;
|
max_idle_conns = 5;
|
||||||
conn_max_lifetime = -1;
|
conn_max_lifetime = -1;
|
||||||
@@ -107,10 +123,10 @@ return 200 '${builtins.toJSON client}';
|
|||||||
private_key = "/etc/dendrite.pem";
|
private_key = "/etc/dendrite.pem";
|
||||||
};
|
};
|
||||||
client_api = {
|
client_api = {
|
||||||
egistration_enabled = false;
|
registration_enabled = false;
|
||||||
registration_shared_secret = "\${REGISTRATION_SHARED_SECRET}";
|
registration_shared_secret = "\${REGISTRATION_SHARED_SECRET}";
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open networking ports for the server
|
# Open networking ports for the server
|
||||||
|
|||||||
Reference in New Issue
Block a user