]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/git/default.nix
Move secrets to flakes
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / git / default.nix
index a5f525bdad765308c97f6efc7f3e6fe637c8db37..755bab005bbf8a1539094192fb94212821230297 100644 (file)
@@ -3,6 +3,7 @@ let
     mantisbt = pkgs.callPackage ./mantisbt.nix {
       inherit (pkgs.webapps) mantisbt_2 mantisbt_2-plugins;
       env = config.myEnv.tools.mantisbt;
+      inherit config;
     };
     gitweb = pkgs.callPackage ./gitweb.nix {
       gitoliteDir = config.myServices.gitolite.gitoliteDir;
@@ -19,8 +20,8 @@ in {
     services.websites.env.tools.modules =
       gitweb.apache.modules ++
       mantisbt.apache.modules;
-    myServices.websites.webappDirs."${gitweb.apache.webappName}" = gitweb.webRoot;
-    myServices.websites.webappDirs."${mantisbt.apache.webappName}" = mantisbt.webRoot;
+    services.websites.webappDirs."${gitweb.apache.webappName}" = gitweb.webRoot;
+    services.websites.webappDirs."${mantisbt.apache.webappName}" = mantisbt.webRoot;
 
     system.activationScripts.mantisbt = mantisbt.activationScript;
     services.websites.env.tools.vhostConfs.git = {
@@ -30,7 +31,7 @@ in {
       root        = gitweb.apache.root;
       extraConfig = [
         gitweb.apache.vhostConf
-        mantisbt.apache.vhostConf
+        (mantisbt.apache.vhostConf config.services.phpfpm.pools.mantisbt.socket)
         ''
           RewriteEngine on
           RewriteCond %{REQUEST_URI}       ^/releases
@@ -38,8 +39,13 @@ in {
           ''
       ];
     };
-    services.phpfpm.poolConfigs = {
-      mantisbt = mantisbt.phpFpm.pool;
+    services.phpfpm.pools = {
+      mantisbt = {
+        user = config.services.httpd.Tools.user;
+        group = config.services.httpd.Tools.group;
+        settings = mantisbt.phpFpm.pool;
+        phpPackage = pkgs.php72;
+      };
     };
   };
 }