Sogo Module implementation #29
1 changed files with 53 additions and 53 deletions
106
modules/sogo.nix
106
modules/sogo.nix
|
@ -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 = {
|
|
||||||
sogo = {
|
|
||||||
enable = true;
|
|
||||||
language = "German";
|
|
||||||
extraConfig = ''
|
|
||||||
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";
|
|
||||||
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 = {
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
sogo = {
|
||||||
|
enable = true;
|
||||||
|
language = "German";
|
||||||
|
extraConfig = ''
|
||||||
|
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";
|
||||||
|
bindPassword = ${config.sops.secrets.SOGo_ldap_search.path};
|
||||||
|
hostname = "ldap://localhost";
|
||||||
|
canAuthenticate = YES;
|
||||||
|
id = directory;
|
||||||
|
|
||||||
|
});
|
||||||
|
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
|
||||||
|
};
|
||||||
|
postgresql = {
|
||||||
|
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…
Add table
Reference in a new issue