]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/commons/adminer.nix
Remove webappdirs
[perso/Immae/Config/Nix.git] / modules / private / websites / commons / adminer.nix
index 98ab4619b9c64355142f6c47cb4bf877ea115833..eae6a9a34fe0f183383476c811487d77f1cb5cc3 100644 (file)
@@ -1,21 +1,4 @@
-{}:
-rec {
-  phpFpm = {
-    socket = "/var/run/phpfpm/adminer.sock";
-  };
-  apache = rec {
-    modules = [ "proxy_fcgi" ];
-    webappName = "_adminer";
-    root = "/run/current-system/webapps/${webappName}";
-    vhostConf = ''
-      Alias /adminer ${root}
-      <Directory ${root}>
-        DirectoryIndex index.php
-        Require all granted
-        <FilesMatch "\.php$">
-          SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
-        </FilesMatch>
-      </Directory>
-      '';
-  };
+{ config, callPackage }:
+callPackage ../tools/tools/adminer.nix {
+  forcePhpSocket = config.services.phpfpm.pools.adminer.socket;
 }