aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/websites/git/mantisbt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'systems/eldiron/websites/git/mantisbt.nix')
-rw-r--r--systems/eldiron/websites/git/mantisbt.nix53
1 files changed, 45 insertions, 8 deletions
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 @@
1{ env, mantisbt_2, mantisbt_2-plugins, config }: 1{ env, mantisbt_2, mantisbt_2-plugins, config, writeText }:
2let
3 mantis_config = {
4 config_inc = config.secrets.fullPaths."webapps/tools-mantisbt";
5 custom_constants_inc = writeText "custom_constants_inc.php" ''
6 <?php
7 define('TESTING', 60);
8 ?>
9 '';
10 custom_strings_inc = writeText "custom_strings_inc.php" ''
11 <?php
12 switch( $g_active_language ) {
13 case 'french':
14 $s_status_enum_string = '10:nouveau,20:retour d’informations,30:reçu,40:confirmé,50:affecté,60:à tester,80:traité,90:fermé';
15 $s_acknowledged_bug_title = 'Recevoir l’anomalie';
16 $s_acknowledged_bug_button = 'Recevoir l’anomalie';
17 $s_email_notification_title_for_status_bug_acknowledged = 'L’anomalie suivante a été REÇUE.';
18
19 $s_testing_bug_title = "Mettre l’anomalie en test";
20 $s_testing_bug_button = 'À tester';
21 $s_email_notification_title_for_status_bug_testing = "L’anomalie suivante est prête à être TESTÉE.";
22 break;
23 default: # english
24 $s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,80:resolved,90:closed';
25
26 $s_testing_bug_title = 'Mark issue Ready for Testing';
27 $s_testing_bug_button = 'Ready for Testing';
28
29 $s_email_notification_title_for_status_bug_testing = 'The following issue is ready for TESTING.';
30 break;
31 }
32 ?>
33 '';
34 };
35in
2rec { 36rec {
3 keys."webapps/tools-mantisbt" = { 37 keys."webapps/tools-mantisbt" = {
4 user = apache.user; 38 user = apache.user;
@@ -20,7 +54,8 @@ rec {
20 $g_allow_anonymous_login = ON; 54 $g_allow_anonymous_login = ON;
21 $g_anonymous_account = 'anonymous'; 55 $g_anonymous_account = 'anonymous';
22 56
23 $g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL; 57 $g_log_level = LOG_EMAIL_VERBOSE;
58 $g_phpMailer_method = PHPMAILER_METHOD_MAIL;
24 $g_smtp_host = 'localhost'; 59 $g_smtp_host = 'localhost';
25 $g_smtp_username = '''; 60 $g_smtp_username = ''';
26 $g_smtp_password = '''; 61 $g_smtp_password = ''';
@@ -42,10 +77,12 @@ rec {
42 $g_ldap_uid_field = 'uid'; 77 $g_ldap_uid_field = 'uid';
43 $g_ldap_realname_field = 'cn'; 78 $g_ldap_realname_field = 'cn';
44 $g_ldap_organization = '${env.ldap.filter}'; 79 $g_ldap_organization = '${env.ldap.filter}';
80
81 $g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,80:resolved,90:closed';
82 $g_status_colors['testing'] = '#ace7ae';
45 ''; 83 '';
46 }; 84 };
47 webRoot = (mantisbt_2.override { mantis_config = 85 webRoot = (mantisbt_2.override { inherit mantis_config; }).withPlugins (p: [p.slack p.source-integration ]);
48 config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration ]);
49 apache = rec { 86 apache = rec {
50 user = "wwwrun"; 87 user = "wwwrun";
51 group = "wwwrun"; 88 group = "wwwrun";
@@ -72,9 +109,8 @@ rec {
72 }; 109 };
73 phpFpm = rec { 110 phpFpm = rec {
74 serviceDeps = [ "postgresql.service" "openldap.service" ]; 111 serviceDeps = [ "postgresql.service" "openldap.service" ];
75 basedir = builtins.concatStringsSep ":" ( 112 basedir = builtins.concatStringsSep ":" ([ webRoot ] ++
76 [ webRoot config.secrets.fullPaths."webapps/tools-mantisbt" ] 113 webRoot.plugins ++ builtins.attrValues mantis_config);
77 ++ webRoot.plugins);
78 pool = { 114 pool = {
79 "listen.owner" = apache.user; 115 "listen.owner" = apache.user;
80 "listen.group" = apache.group; 116 "listen.group" = apache.group;
@@ -84,7 +120,8 @@ rec {
84 120
85 "php_admin_value[upload_max_filesize]" = "5000000"; 121 "php_admin_value[upload_max_filesize]" = "5000000";
86 122
87 "php_admin_value[open_basedir]" = "${basedir}:/tmp"; 123 "php_admin_value[sendmail_path]" = "/run/wrappers/bin/sendmail -t -i";
124 "php_admin_value[open_basedir]" = "${basedir}:/tmp:/run/wrappers/bin/sendmail";
88 "php_admin_value[session.save_handler]" = "redis"; 125 "php_admin_value[session.save_handler]" = "redis";
89 "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:MantisBT:'"; 126 "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:MantisBT:'";
90 }; 127 };