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/flake.lock | 18 +++++------ systems/eldiron/websites/git/mantisbt.nix | 53 ++++++++++++++++++++++++++----- 2 files changed, 54 insertions(+), 17 deletions(-) (limited to 'systems/eldiron') diff --git a/systems/eldiron/flake.lock b/systems/eldiron/flake.lock index 193ef5e..9d6c296 100644 --- a/systems/eldiron/flake.lock +++ b/systems/eldiron/flake.lock @@ -813,7 +813,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-0u2hGR7yEILkNAzKlYiajJNV+ZL39+6HFhJzLwvoE6E=", + "narHash": "sha256-yHJid6Rpxa5pfKI81FfI0VZir9seZMHtLzjdvmt0FVw=", "path": "../../mypackages", "type": "path" }, @@ -830,7 +830,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-0u2hGR7yEILkNAzKlYiajJNV+ZL39+6HFhJzLwvoE6E=", + "narHash": "sha256-yHJid6Rpxa5pfKI81FfI0VZir9seZMHtLzjdvmt0FVw=", "path": "../mypackages", "type": "path" }, @@ -847,7 +847,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-0u2hGR7yEILkNAzKlYiajJNV+ZL39+6HFhJzLwvoE6E=", + "narHash": "sha256-yHJid6Rpxa5pfKI81FfI0VZir9seZMHtLzjdvmt0FVw=", "path": "../mypackages", "type": "path" }, @@ -864,7 +864,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-0u2hGR7yEILkNAzKlYiajJNV+ZL39+6HFhJzLwvoE6E=", + "narHash": "sha256-yHJid6Rpxa5pfKI81FfI0VZir9seZMHtLzjdvmt0FVw=", "path": "../mypackages", "type": "path" }, @@ -2153,7 +2153,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-zbQxRzS3bTCQO/0D/AJYNU/xwBmXgfU82PDLxVyXcAQ=", + "narHash": "sha256-5cM87LAHjrWoZRc2QbM6Xu9klzMNBpREjz6sWqp+hFA=", "path": "../../flakes/private/system", "type": "path" }, @@ -2206,7 +2206,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-3jBcul1HygZm8wcM5jC/sUHZ5YtqJ9tFVHfcLkkcA5o=", + "narHash": "sha256-2fWHwmMMILe0enrbMMgFoVH+3PysvSx1Oair4W2hgIw=", "path": "../../flakes/etherpad-lite", "type": "path" }, @@ -2248,7 +2248,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-XCx9WCDeZBKnXW6bKGwuQkRo20o8QY9H1bDGWeuvz2Y=", + "narHash": "sha256-emS5jDCcLaK3/Hqk/2p6jQDxZfO1hPicMTblyVBD7EI=", "path": "../../flakes/grocy", "type": "path" }, @@ -2329,7 +2329,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-0u2hGR7yEILkNAzKlYiajJNV+ZL39+6HFhJzLwvoE6E=", + "narHash": "sha256-yHJid6Rpxa5pfKI81FfI0VZir9seZMHtLzjdvmt0FVw=", "path": "../../flakes/mypackages", "type": "path" }, @@ -2440,7 +2440,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-TGXBCAl2v69YQq5ucXMaoqh8er1R2mnmxz9xt4oYS/Y=", + "narHash": "sha256-cR14yn0IbWNe98PAlV+MHO6ClQqeT5HztMeLawldtWs=", "path": "../../flakes/surfer", "type": "path" }, 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