Sogo Module implementation #29

Merged
tenksom merged 6 commits from sogo-test into main 2023-04-03 23:05:28 +02:00
Showing only changes of commit 6e36183995 - Show all commits

View file

@ -1,61 +1,61 @@
{config, pkgs, ... }: { config, pkgs, ... }:
let let
SOGo-hostname = "mail.${config.fsr.domain}"; SOGo-hostname = "mail.${config.fsr.domain}";
domain = config.fsr.domain; domain = config.fsr.domain;
in in
{ {
sops.secrets.sogo_ldap_search = { sops.secrets.sogo_ldap_search = {
key = "portunus_search"; key = "portunus_search";
# owner = config.systemd.services keine Ahnung was hier hin soll # 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;
CNFieldName = cn; CNFieldName = cn;
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 = ${config.sops.secrets.SOGo_ldap_search.path}; bindPassword = ${config.sops.secrets.SOGo_ldap_search.path};
hostname = "ldap://localhost"; hostname = "ldap://localhost";
canAuthenticate = YES; canAuthenticate = YES;
id = directory; id = directory;
}); });
SOGoProfileURL = "postgresql://sogo:sogo@localhost:5432/ SOGoProfileURL = "postgresql://sogo:sogo@localhost:5432/sogo/sogo_user_profile";
SOGoFolderInfoURL = "postgreql://sogo:sogo@localhost:5432/sogo/sogo_folder_info";
OCSSessionsFolderURL = "postgresql://sogo:sogo@localhost:5432/sogo/sogo_sessions_folder";
''; # Hier ist bindPassword noch nicht vollständig ''; # Hier ist bindPassword noch nicht vollständig
}; };
postgresql = { postgresql = {
ensureUsers = [{ ensureUsers = [{
name = "SOGo"; name = "SOGo";
}]; }];
ensureDatabases = [ "SOGo" ]; ensureDatabases = [ "SOGo" ];
}; };
nginx = { nginx = {
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts."${SOGo-hostname}" = { virtualHosts."${SOGo-hostname}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:443"; proxyPass = "http://127.0.0.1:443";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
};
};
}
};
};
} }