2020-05-29 06:06:01 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
|
|
name = "sogo";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-05-29 06:06:01 +00:00
|
|
|
maintainers = [ ajs124 das_j ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
sogo = { config, pkgs, ... }: {
|
|
|
|
services.nginx.enable = true;
|
|
|
|
|
|
|
|
services.mysql = {
|
|
|
|
enable = true;
|
2021-06-06 07:54:09 +00:00
|
|
|
package = pkgs.mariadb;
|
2020-05-29 06:06:01 +00:00
|
|
|
ensureDatabases = [ "sogo" ];
|
|
|
|
ensureUsers = [{
|
|
|
|
name = "sogo";
|
|
|
|
ensurePermissions = {
|
|
|
|
"sogo.*" = "ALL PRIVILEGES";
|
|
|
|
};
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.sogo = {
|
|
|
|
enable = true;
|
|
|
|
timezone = "Europe/Berlin";
|
|
|
|
extraConfig = ''
|
|
|
|
WOWorkersCount = 1;
|
|
|
|
|
|
|
|
SOGoUserSources = (
|
|
|
|
{
|
|
|
|
type = sql;
|
|
|
|
userPasswordAlgorithm = md5;
|
|
|
|
viewURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_users";
|
|
|
|
canAuthenticate = YES;
|
|
|
|
id = users;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
SOGoProfileURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_user_profile";
|
|
|
|
OCSFolderInfoURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_folder_info";
|
|
|
|
OCSSessionsFolderURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_sessions_folder";
|
|
|
|
OCSEMailAlarmsFolderURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_alarms_folder";
|
|
|
|
OCSStoreURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_store";
|
|
|
|
OCSAclURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_acl";
|
|
|
|
OCSCacheFolderURL = "mysql://sogo@%2Frun%2Fmysqld%2Fmysqld.sock/sogo/sogo_cache_folder";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
sogo.wait_for_unit("multi-user.target")
|
|
|
|
sogo.wait_for_open_port(20000)
|
|
|
|
sogo.wait_for_open_port(80)
|
|
|
|
sogo.succeed("curl -sSfL http://sogo/SOGo")
|
|
|
|
'';
|
|
|
|
})
|