Adding ldap, nginx, postgresql config in SOGo
This commit is contained in:
parent
a3f4e289e1
commit
4f5137c6b9
|
@ -1,15 +1,20 @@
|
||||||
{config, pkgs, ... }:
|
{config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
hostname = "webmail.${config.fsr.domain}";
|
SOGo-hostname = "mail.${config.fsr.domain}";
|
||||||
domain = config.fsr.domain;
|
domain = config.fsr.domain;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
sops.secrets.sogo_ldap_search = {
|
||||||
|
key = "portunus_search";
|
||||||
|
# owner = config.systemd.services keine Ahnung was hier hin soll
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
sogo = {
|
sogo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
language = "German";
|
language = "German";
|
||||||
extraConfig = "
|
extraConfig = ''
|
||||||
WOWorkersCount = 10;
|
WOWorkersCount = 10;
|
||||||
SOGoUserSources = ({
|
SOGoUserSources = ({
|
||||||
type = ldap;
|
type = ldap;
|
||||||
|
@ -17,15 +22,40 @@ in
|
||||||
UIDFieldName = uid;
|
UIDFieldName = uid;
|
||||||
baseDN = "ou = users, dc=ifsr, dc=de";
|
baseDN = "ou = users, dc=ifsr, dc=de";
|
||||||
bindDN = "uid=search, 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";
|
hostname = "ldap://localhost";
|
||||||
|
canAuthenticate = YES;
|
||||||
|
id = directory;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
SOGoProfileURL = "postgresql://sogo:sogo@localhost:5432/
|
||||||
|
|
||||||
";
|
''; # Hier ist bindPassword noch nicht vollständig
|
||||||
}
|
};
|
||||||
postgresql = {
|
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