diff options
Diffstat (limited to 'modules/private/websites/tools/git/mantisbt.nix')
-rw-r--r-- | modules/private/websites/tools/git/mantisbt.nix | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/modules/private/websites/tools/git/mantisbt.nix b/modules/private/websites/tools/git/mantisbt.nix deleted file mode 100644 index 2ef76af..0000000 --- a/modules/private/websites/tools/git/mantisbt.nix +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | { env, mantisbt_2, mantisbt_2-plugins, config }: | ||
2 | rec { | ||
3 | activationScript = { | ||
4 | deps = [ "httpd" ]; | ||
5 | text = '' | ||
6 | install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt | ||
7 | ''; | ||
8 | }; | ||
9 | keys."webapps/tools-mantisbt" = { | ||
10 | user = apache.user; | ||
11 | group = apache.group; | ||
12 | permissions = "0400"; | ||
13 | text = '' | ||
14 | <?php | ||
15 | $g_hostname = '${env.postgresql.socket}'; | ||
16 | $g_db_username = '${env.postgresql.user}'; | ||
17 | $g_db_password = '${env.postgresql.password}'; | ||
18 | $g_database_name = '${env.postgresql.database}'; | ||
19 | $g_db_type = 'pgsql'; | ||
20 | $g_crypto_master_salt = '${env.master_salt}'; | ||
21 | $g_allow_signup = OFF; | ||
22 | $g_allow_anonymous_login = ON; | ||
23 | $g_anonymous_account = 'anonymous'; | ||
24 | |||
25 | $g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL; | ||
26 | $g_smtp_host = 'localhost'; | ||
27 | $g_smtp_username = '''; | ||
28 | $g_smtp_password = '''; | ||
29 | $g_webmaster_email = 'mantisbt@tools.immae.eu'; | ||
30 | $g_from_email = 'mantisbt@tools.immae.eu'; | ||
31 | $g_return_path_email = 'mantisbt@tools.immae.eu'; | ||
32 | $g_from_name = 'Mantis Bug Tracker at git.immae.eu'; | ||
33 | $g_email_receive_own = ON; | ||
34 | # --- LDAP --- | ||
35 | $g_login_method = LDAP; | ||
36 | $g_ldap_protocol_version = 3; | ||
37 | $g_ldap_server = 'ldaps://${env.ldap.host}:636'; | ||
38 | $g_ldap_root_dn = 'ou=users,${env.ldap.base}'; | ||
39 | $g_ldap_bind_dn = '${env.ldap.dn}'; | ||
40 | $g_ldap_bind_passwd = '${env.ldap.password}'; | ||
41 | $g_use_ldap_email = ON; | ||
42 | $g_use_ldap_realname = ON; | ||
43 | $g_ldap_uid_field = 'uid'; | ||
44 | $g_ldap_realname_field = 'cn'; | ||
45 | $g_ldap_organization = '${env.ldap.filter}'; | ||
46 | ''; | ||
47 | }; | ||
48 | webRoot = (mantisbt_2.override { mantis_config = config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]); | ||
49 | apache = rec { | ||
50 | user = "wwwrun"; | ||
51 | group = "wwwrun"; | ||
52 | modules = [ "proxy_fcgi" ]; | ||
53 | root = webRoot; | ||
54 | vhostConf = socket: '' | ||
55 | Alias /mantisbt "${root}" | ||
56 | <Directory "${root}"> | ||
57 | DirectoryIndex index.php | ||
58 | <FilesMatch "\.php$"> | ||
59 | SetHandler "proxy:unix:${socket}|fcgi://localhost" | ||
60 | </FilesMatch> | ||
61 | |||
62 | AllowOverride All | ||
63 | SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | ||
64 | Options FollowSymlinks | ||
65 | Require all granted | ||
66 | </Directory> | ||
67 | <Directory "${root}/admin"> | ||
68 | #Reenable during upgrade | ||
69 | Require all denied | ||
70 | </Directory> | ||
71 | ''; | ||
72 | }; | ||
73 | phpFpm = rec { | ||
74 | serviceDeps = [ "postgresql.service" "openldap.service" ]; | ||
75 | basedir = builtins.concatStringsSep ":" ( | ||
76 | [ webRoot config.secrets.fullPaths."webapps/tools-mantisbt" ] | ||
77 | ++ webRoot.plugins); | ||
78 | pool = { | ||
79 | "listen.owner" = apache.user; | ||
80 | "listen.group" = apache.group; | ||
81 | "pm" = "ondemand"; | ||
82 | "pm.max_children" = "60"; | ||
83 | "pm.process_idle_timeout" = "60"; | ||
84 | |||
85 | "php_admin_value[upload_max_filesize]" = "5000000"; | ||
86 | |||
87 | "php_admin_value[open_basedir]" = "${basedir}:/tmp:/var/lib/php/sessions/mantisbt"; | ||
88 | "php_admin_value[session.save_path]" = "/var/lib/php/sessions/mantisbt"; | ||
89 | }; | ||
90 | }; | ||
91 | } | ||