From 2887cca3e2aaf392bb405fe3b14f6eaad726d72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 3 Aug 2024 00:33:10 +0200 Subject: Fix e-mails for mantisbt --- systems/eldiron/websites/git/mantisbt.nix | 53 ++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 8 deletions(-) (limited to 'systems/eldiron/websites') diff --git a/systems/eldiron/websites/git/mantisbt.nix b/systems/eldiron/websites/git/mantisbt.nix index b0ee553..824e2e1 100644 --- a/systems/eldiron/websites/git/mantisbt.nix +++ b/systems/eldiron/websites/git/mantisbt.nix @@ -1,4 +1,38 @@ -{ env, mantisbt_2, mantisbt_2-plugins, config }: +{ env, mantisbt_2, mantisbt_2-plugins, config, writeText }: +let + mantis_config = { + config_inc = config.secrets.fullPaths."webapps/tools-mantisbt"; + custom_constants_inc = writeText "custom_constants_inc.php" '' + + ''; + custom_strings_inc = writeText "custom_strings_inc.php" '' + + ''; + }; +in rec { keys."webapps/tools-mantisbt" = { user = apache.user; @@ -20,7 +54,8 @@ rec { $g_allow_anonymous_login = ON; $g_anonymous_account = 'anonymous'; - $g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL; + $g_log_level = LOG_EMAIL_VERBOSE; + $g_phpMailer_method = PHPMAILER_METHOD_MAIL; $g_smtp_host = 'localhost'; $g_smtp_username = '''; $g_smtp_password = '''; @@ -42,10 +77,12 @@ rec { $g_ldap_uid_field = 'uid'; $g_ldap_realname_field = 'cn'; $g_ldap_organization = '${env.ldap.filter}'; + + $g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,80:resolved,90:closed'; + $g_status_colors['testing'] = '#ace7ae'; ''; }; - webRoot = (mantisbt_2.override { mantis_config = - config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration ]); + webRoot = (mantisbt_2.override { inherit mantis_config; }).withPlugins (p: [p.slack p.source-integration ]); apache = rec { user = "wwwrun"; group = "wwwrun"; @@ -72,9 +109,8 @@ rec { }; phpFpm = rec { serviceDeps = [ "postgresql.service" "openldap.service" ]; - basedir = builtins.concatStringsSep ":" ( - [ webRoot config.secrets.fullPaths."webapps/tools-mantisbt" ] - ++ webRoot.plugins); + basedir = builtins.concatStringsSep ":" ([ webRoot ] ++ + webRoot.plugins ++ builtins.attrValues mantis_config); pool = { "listen.owner" = apache.user; "listen.group" = apache.group; @@ -84,7 +120,8 @@ rec { "php_admin_value[upload_max_filesize]" = "5000000"; - "php_admin_value[open_basedir]" = "${basedir}:/tmp"; + "php_admin_value[sendmail_path]" = "/run/wrappers/bin/sendmail -t -i"; + "php_admin_value[open_basedir]" = "${basedir}:/tmp:/run/wrappers/bin/sendmail"; "php_admin_value[session.save_handler]" = "redis"; "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:MantisBT:'"; }; -- cgit v1.2.3