]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/git/mantisbt.nix
Move secrets to flakes
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / git / mantisbt.nix
index a74d76e8b5e8e08c83e07b0b0a3fa52d740573bd..e6a8da78314d1c3c7d6d98411fb29e0452246b28 100644 (file)
@@ -1,4 +1,4 @@
-{ env, mantisbt_2, mantisbt_2-plugins }:
+{ env, mantisbt_2, mantisbt_2-plugins, config }:
 rec {
   activationScript = {
     deps = [ "httpd" ];
@@ -46,7 +46,7 @@ rec {
       $g_ldap_organization = '${env.ldap.filter}';
     '';
   }];
-  webRoot = (mantisbt_2.override { mantis_config = "/var/secrets/webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]);
+  webRoot = (mantisbt_2.override { mantis_config = config.secrets.fullPaths."webapps/tools-mantisbt"; }).withPlugins (p: [p.slack p.source-integration]);
   apache = rec {
     user = "wwwrun";
     group = "wwwrun";
@@ -62,6 +62,7 @@ rec {
         </FilesMatch>
 
         AllowOverride All
+        SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
         Options FollowSymlinks
         Require all granted
       </Directory>
@@ -74,7 +75,7 @@ rec {
   phpFpm = rec {
     serviceDeps = [ "postgresql.service" "openldap.service" ];
     basedir = builtins.concatStringsSep ":" (
-      [ webRoot "/var/secrets/webapps/tools-mantisbt" ]
+      [ webRoot config.secrets.fullPaths."webapps/tools-mantisbt" ]
       ++ webRoot.plugins);
     pool = {
       "listen.owner" = apache.user;