use underscores instead of dashes in database name

This commit is contained in:
Charlotte 🦝 Delenk 2022-04-29 21:02:32 +01:00
parent 2d7a261c26
commit c439d34853
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -6,7 +6,7 @@ let
bindAddress = "127.0.0.1"; bindAddress = "127.0.0.1";
port = 8008; port = 8008;
}; };
database.postgres = "postgresql://matrix-media-repo@localhost/matrix-media-repo?sslmode=disable"; database.postgres = "postgresql://matrix-media-repo@localhost/matrix_media_repo?sslmode=disable";
homeservers = [{ homeservers = [{
name = "chir.rs"; name = "chir.rs";
csApi = "https://matrix.chir.rs"; csApi = "https://matrix.chir.rs";
@ -63,12 +63,12 @@ in
"d '/var/lib/matrix-media-repo' 0750 matrix-media-repo matrix-media-repo - -" "d '/var/lib/matrix-media-repo' 0750 matrix-media-repo matrix-media-repo - -"
]; ];
services.postgresql.ensureDatabases = [ services.postgresql.ensureDatabases = [
"matrix-media-repo" "matrix_media_repo"
]; ];
services.postgresql.ensureUsers = [{ services.postgresql.ensureUsers = [{
name = "matrix-media-repo"; name = "matrix-media-repo";
ensurePermissions = { ensurePermissions = {
"DATABASE matrix-media-repo" = "ALL_PRIVILEGES"; "DATABASE matrix_media_repo" = "ALL_PRIVILEGES";
}; };
}]; }];
} }