]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/isabelle/aten_integration.nix
Move devtools to other place
[perso/Immae/Config/Nix.git] / modules / private / websites / isabelle / aten_integration.nix
index 7e0aaf726eeeda00285fedc0c5574cc1e03c85a9..288f20d04fa324564360458fbf12ccf80e014e6c 100644 (file)
@@ -1,11 +1,7 @@
 { lib, pkgs, config,  ... }:
 let
   secrets = config.myEnv.websites.isabelle.aten_integration;
-  app = pkgs.callPackage ./aten_app {
-    composerEnv = pkgs.composerEnv.override { php = pkgs.php72; };
-    environment = secrets.environment;
-    varDir = "/var/lib/isabelle_aten_integration";
-  };
+  webRoot = "/var/lib/ftp/immae/aten/public";
   cfg = config.myServices.websites.isabelle.aten_integration;
   pcfg = config.services.phpApplication;
 in {
@@ -20,11 +16,12 @@ in {
       httpdWatchFiles = [
         config.secrets.fullPaths."websites/isabelle/aten_integration"
       ];
-      inherit (app) webRoot varDir;
-      inherit app;
+      inherit webRoot;
+      varDir = "/var/lib/ftp/immae/aten_var";
+      app = "/var/lib/ftp/immae/aten";
       serviceDeps = [ "postgresql.service" ];
       preStartActions = [
-        "APP_ENV=${app.environment} ./bin/console --env=${app.environment} cache:clear --no-warmup"
+        "APP_ENV=dev ./bin/console --env=dev cache:clear --no-warmup"
       ];
       phpOpenbasedir = [ "/tmp" ];
       phpPool = {
@@ -51,7 +48,7 @@ in {
         #   vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery
         psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}";
       in ''
-        SetEnv APP_ENV      "${app.environment}"
+        SetEnv APP_ENV      "dev"
         SetEnv APP_SECRET   "${secrets.secret}"
         SetEnv DATABASE_URL "${psql_url}"
         '';
@@ -60,7 +57,7 @@ in {
       certName    = "integration";
       addToCerts  = true;
       hosts       = [ "dev.aten.pro" ];
-      root        = app.webRoot;
+      root        = webRoot;
       extraConfig = [
         ''
         <FilesMatch "\.php$">
@@ -81,7 +78,7 @@ in {
           ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://aten.pro\"></html>"
         </Location>
 
-        <Directory ${app.webRoot}>
+        <Directory ${webRoot}>
           Options Indexes FollowSymLinks MultiViews Includes
           AllowOverride All
           Require all granted