Adding ldap, nginx, postgresql config in SOGo
This commit is contained in:
parent
a3f4e289e1
commit
4f5137c6b9
|
@ -1,15 +1,20 @@
|
|||
{config, pkgs, ... }:
|
||||
let
|
||||
hostname = "webmail.${config.fsr.domain}";
|
||||
SOGo-hostname = "mail.${config.fsr.domain}";
|
||||
domain = config.fsr.domain;
|
||||
|
||||
in
|
||||
{
|
||||
sops.secrets.sogo_ldap_search = {
|
||||
key = "portunus_search";
|
||||
# owner = config.systemd.services keine Ahnung was hier hin soll
|
||||
|
||||
|
||||
};
|
||||
services = {
|
||||
sogo = {
|
||||
enable = true;
|
||||
language = "German";
|
||||
extraConfig = "
|
||||
extraConfig = ''
|
||||
WOWorkersCount = 10;
|
||||
SOGoUserSources = ({
|
||||
type = ldap;
|
||||
|
@ -17,15 +22,40 @@ in
|
|||
UIDFieldName = uid;
|
||||
baseDN = "ou = users, dc=ifsr, dc=de";
|
||||
bindDN = "uid=search, ou=users, dc=ifsr, dc=de";
|
||||
bindPassword = qwertz;
|
||||
bindPassword = ${config.sops.secrets.SOGo_ldap_search.path};
|
||||
hostname = "ldap://localhost";
|
||||
canAuthenticate = YES;
|
||||
id = directory;
|
||||
|
||||
});
|
||||
SOGoProfileURL = "postgresql://sogo:sogo@localhost:5432/
|
||||
|
||||
";
|
||||
}
|
||||
''; # Hier ist bindPassword noch nicht vollständig
|
||||
};
|
||||
postgresql = {
|
||||
enable = true;
|
||||
}
|
||||
ensureUsers = [{
|
||||
name = "SOGo";
|
||||
}];
|
||||
ensureDatabases = [ "SOGo" ];
|
||||
};
|
||||
|
||||
}
|
||||
nginx = {
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."${SOGo-hostname}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:443";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue