]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/piedsjaloux/integration.nix
Move devtools to other place
[perso/Immae/Config/Nix.git] / modules / private / websites / piedsjaloux / integration.nix
index 437b127133235e6b92c5f77c862cb82a15a2f3d8..64d577ec98fbbd60312317a96c639cc5fd871cc8 100644 (file)
@@ -1,12 +1,7 @@
 { lib, pkgs, config,  ... }:
 let
   secrets = config.myEnv.websites.piedsjaloux.integration;
-  app = pkgs.callPackage ./app {
-    composerEnv = pkgs.composerEnv.override { php = pkgs.php72; };
-    environment = secrets.environment;
-    varDir = "/var/lib/piedsjaloux_integration";
-    secretsPath = config.secrets.fullPaths."websites/piedsjaloux/integration";
-  };
+  webRoot = "/var/lib/ftp/immae/piedsjaloux/web";
   cfg = config.myServices.websites.piedsjaloux.integration;
   pcfg = config.services.phpApplication;
   texlive = pkgs.texlive.combine { inherit (pkgs.texlive) attachfile preprint scheme-small; };
@@ -19,14 +14,15 @@ in {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
       httpdGroup = config.services.httpd.Inte.group;
-      inherit (app) webRoot varDir;
+      inherit webRoot;
+      varDir = "/var/lib/ftp/immae/piedsjaloux_var";
       varDirPaths = {
         "tmp" = "0700";
       };
-      inherit app;
+      app = "/var/lib/ftp/immae/piedsjaloux";
       serviceDeps = [ "mysql.service" ];
       preStartActions = [
-        "./bin/console --env=${app.environment} cache:clear --no-warmup"
+        "./bin/console --env=dev cache:clear --no-warmup"
       ];
       phpOpenbasedir = [ "/tmp" ];
       phpPool = {
@@ -47,7 +43,7 @@ in {
         SYMFONY_DEBUG_MODE = "\"yes\"";
       };
       phpWatchFiles = [
-        app.secretsPath
+        config.secrets.fullPaths."websites/piedsjaloux/integration"
       ];
       phpPackage = pkgs.php72;
     };
@@ -80,7 +76,7 @@ in {
       certName     = "integration";
       addToCerts  = true;
       hosts       = [ "piedsjaloux.immae.eu" ];
-      root        = app.webRoot;
+      root        = webRoot;
       extraConfig = [
         ''
         <FilesMatch "\.php$">
@@ -93,7 +89,7 @@ in {
           ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
         </Location>
 
-        <Directory ${app.webRoot}>
+        <Directory ${webRoot}>
           Options Indexes FollowSymLinks MultiViews Includes
           AllowOverride None
           Require all granted