Move Dendrite to Isaiah

This commit is contained in:
Greg Hellings
2024-02-27 14:42:19 -06:00
parent 102463a783
commit b536a7e3ef
8 changed files with 168 additions and 70 deletions
+1 -6
View File
@@ -5,7 +5,6 @@
enable = true;
checkConfig = true;
ensureDatabases = [
"dendrite"
"nextcloud"
];
#initialScript = pkgs.writeText "create-matrix-db.sql" ''
@@ -16,10 +15,7 @@
ensureUsers = [ {
name = "nextcloud";
ensureDBOwnership = true;
} {
name = "dendrite";
ensureDBOwnership = true;
} ];
} ];
settings = {
log_connections = true;
log_statement = "all";
@@ -34,7 +30,6 @@ root root postgres
services.postgresqlBackup = {
enable = true;
databases = [
"dendrite"
"nextcloud"
];
};
-60
View File
@@ -69,66 +69,6 @@ return 200 '${builtins.toJSON client}';
};
};
# Environment secrets
age.secrets.dendrite = {
file = ../../secrets/dendrite.age;
owner = "dendrite";
};
users.users.dendrite = {
isSystemUser = true;
group = "dendrite";
};
users.groups.dendrite = {};
systemd.services.dendrite.serviceConfig = {
User = "dendrite";
};
services.dendrite = {
enable = true;
environmentFile = "/run/agenix/dendrite";
httpPort = 8448;
# Identify ourselves as the root of our own domain
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 = {
database = {
connection_string = conn;
max_open_conns = 25;
max_idle_conns = 5;
conn_max_lifetime = -1;
};
server_name = "thehellings.com";
trusted_third_party_id_servers = [
"matrix.org"
"vector.im"
"jupiterbroadcasting.com"
];
# Generate this with {path-to-dendrite}/bin/generate-keys --private-key /etc/dendrite.pem
private_key = "/etc/dendrite.pem";
};
client_api = {
registration_enabled = false;
registration_shared_secret = "\${REGISTRATION_SHARED_SECRET}";
};
});
};
# Open networking ports for the server
networking.firewall = {
enable = true;