2023-03-07 17:59:22 +01:00
|
|
|
{ config, pkgs, ... }:
|
2023-03-01 18:44:56 +01:00
|
|
|
let
|
2023-03-07 17:59:22 +01:00
|
|
|
SOGo-hostname = "mail.${config.fsr.domain}";
|
|
|
|
domain = config.fsr.domain;
|
2023-03-01 18:44:56 +01:00
|
|
|
in
|
|
|
|
{
|
2023-04-03 23:14:12 +02:00
|
|
|
sops.secrets.ldap_search = {
|
|
|
|
owner = config.systemd.services.sogo.serviceConfig.User;
|
2023-03-07 17:59:22 +01:00
|
|
|
};
|
2023-04-03 23:14:12 +02:00
|
|
|
|
2023-03-07 17:59:22 +01:00
|
|
|
services = {
|
|
|
|
sogo = {
|
|
|
|
enable = true;
|
|
|
|
language = "German";
|
|
|
|
extraConfig = ''
|
2023-04-03 23:05:00 +02:00
|
|
|
WOWorkersCount = 10;
|
|
|
|
SOGoUserSources = ({
|
|
|
|
type = ldap;
|
|
|
|
CNFieldName = cn;
|
|
|
|
UIDFieldName = uid;
|
|
|
|
baseDN = "ou = users, dc=ifsr, dc=de";
|
|
|
|
bindDN = "uid=search, ou=users, dc=ifsr, dc=de";
|
2023-04-03 23:14:12 +02:00
|
|
|
bindPassword = ${config.sops.secrets.ldap_search.path};
|
2023-04-03 23:05:00 +02:00
|
|
|
hostname = "ldap://localhost";
|
|
|
|
canAuthenticate = YES;
|
|
|
|
id = directory;
|
2023-03-07 17:59:22 +01:00
|
|
|
|
2023-04-03 23:05:00 +02:00
|
|
|
});
|
|
|
|
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";
|
|
|
|
|
2023-03-07 17:59:22 +01:00
|
|
|
''; # Hier ist bindPassword noch nicht vollständig
|
2023-03-22 11:24:14 +01:00
|
|
|
vhostName = "${SOGo-hostname}";
|
|
|
|
timezone = "Europe/Berlin";
|
2023-03-07 17:59:22 +01:00
|
|
|
};
|
|
|
|
postgresql = {
|
|
|
|
ensureUsers = [{
|
|
|
|
name = "SOGo";
|
|
|
|
}];
|
|
|
|
ensureDatabases = [ "SOGo" ];
|
|
|
|
};
|
2023-03-07 13:06:24 +01:00
|
|
|
|
2023-03-07 17:59:22 +01:00
|
|
|
nginx = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts."${SOGo-hostname}" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
2023-03-22 12:09:21 +01:00
|
|
|
proxyPass = "http://127.0.0.1:20000";
|
2023-03-07 17:59:22 +01:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2023-03-07 13:06:24 +01:00
|
|
|
|
2023-03-07 17:59:22 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2023-03-22 11:24:14 +01:00
|
|
|
};
|
2023-03-07 13:06:24 +01:00
|
|
|
}
|