fixing database string

This commit is contained in:
revol-xut 2023-04-13 18:52:15 +02:00
parent a8824ce574
commit 9cda0097fc
No known key found for this signature in database
GPG key ID: 4F56FF7759627D07

View file

@ -2,6 +2,7 @@
let let
sogo-hostname = "mail.${config.fsr.domain}"; sogo-hostname = "mail.${config.fsr.domain}";
domain = config.fsr.domain; domain = config.fsr.domain;
pg-port = config.services.postgresql.port;
in in
{ {
sops.secrets.ldap_search = { sops.secrets.ldap_search = {
@ -29,28 +30,29 @@ in
id = directory; id = directory;
}); });
SOGoProfileURL = "postgresql://sogo:sogo@localhost:5432/sogo/sogo_user_profile"; SOGoProfileURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_user_profile";
SOGoFolderInfoURL = "postgreql://sogo:sogo@localhost:5432/sogo/sogo_folder_info"; SOGoFolderInfoURL = "postgreql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_folder_info";
OCSSessionsFolderURL = "postgresql://sogo:sogo@localhost:5432/sogo/sogo_sessions_folder"; OCSSessionsFolderURL = "postgresql://sogo:POSTGRES_PASSWORD@localhost:${pg-port}/sogo/sogo_sessions_folder";
''; # Hier ist bindPassword noch nicht vollständig ''; # Hier ist bindPassword noch nicht vollständig
configReplaces = { configReplaces = {
LDAP_SEARCH = config.sops.secrets.ldap_search.path; LDAP_SEARCH = config.sops.secrets.ldap_search.path;
POSTGRES_PASSWORD = config.sops.secrets.postgres_sogo;
}; };
vhostName = "${sogo-hostname}"; vhostName = "${sogo-hostname}";
timezone = "Europe/Berlin"; timezone = "Europe/Berlin";
}; };
postgresql = { postgresql = {
enable = true; enable = true;
ensureUsers = [ ensureUsers = [
{ {
name = "sogo"; name = "sogo";
ensurePermissions = { ensurePermissions = {
"DATABASE sogo" = "ALL PRIVILEGES"; "DATABASE sogo" = "ALL PRIVILEGES";
}; };
} }
]; ];
ensureDatabases = [ "sogo" ]; ensureDatabases = [ "sogo" ];
}; };
nginx = { nginx = {
recommendedProxySettings = true; recommendedProxySettings = true;