mailman: use postgresql

This commit is contained in:
Rouven Seifert 2023-09-14 14:54:09 +02:00
parent 6d4bf60a04
commit fcb4c6a36d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09

View file

@ -11,6 +11,18 @@
hyperkitty.enable = true;
enablePostfix = true;
siteOwner = "mailman@${config.fsr.domain}";
settings = {
database = {
class = "mailman.database.postgresql.PostgreSQLDatabase";
url = "postgresql://mailman@/mailman?host=/run/postgresql";
};
};
webSettings = {
DATABASES.default = {
ENGINE = "django.db.backends.postgresql";
NAME = "mailmanweb";
};
};
ldap = {
enable = true;
serverUri = "ldap://localhost";
@ -28,6 +40,24 @@
superUserGroup = "cn=admins,ou=groups,dc=ifsr,dc=de";
};
};
services.postgresql = {
enable = true;
ensureUsers = [
{
name = "mailman";
ensurePermissions = {
"DATABASE mailman" = "ALL PRIVILEGES";
};
}
{
name = "mailman-web";
ensurePermissions = {
"DATABASE mailmanweb" = "ALL PRIVILEGES";
};
}
];
ensureDatabases = [ "mailman" "mailmanweb" ];
};
services.nginx.virtualHosts."lists.${config.fsr.domain}" = {
enableACME = true;
forceSSL = true;