]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/git/mantisbt.nix
Remove webappdirs
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / git / mantisbt.nix
index 9996d230140ab4b32e565d449af6ed03e6fcab52..2ef76afe0637a4edd1b5c4ce48cae2fbf615fe64 100644 (file)
@@ -1,4 +1,4 @@
-{ env, mantisbt_2, mantisbt_2-plugins }:
+{ env, mantisbt_2, mantisbt_2-plugins, config }:
 rec {
   activationScript = {
     deps = [ "httpd" ];
@@ -6,8 +6,7 @@ rec {
       install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt
     '';
   };
-  keys = [{
-    dest = "webapps/tools-mantisbt";
+  keys."webapps/tools-mantisbt" = {
     user = apache.user;
     group = apache.group;
     permissions = "0400";
@@ -45,14 +44,13 @@ rec {
       $g_ldap_realname_field = 'cn';
       $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";
     modules = [ "proxy_fcgi" ];
-    webappName = "tools_mantisbt";
-    root = "/run/current-system/webapps/${webappName}";
+    root = webRoot;
     vhostConf = socket: ''
       Alias /mantisbt "${root}"
       <Directory "${root}">
@@ -75,7 +73,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;