mailman: use postgresql
This commit is contained in:
parent
6d4bf60a04
commit
fcb4c6a36d
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue