]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/ludivinecassal/integration.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / websites / ludivinecassal / integration.nix
index 55f243274ce9218e6d3740c3af5e5ea18bfa9be5..d304fdf9e76b390cdc76561b0535079b22a6103c 100644 (file)
@@ -1,6 +1,6 @@
-{ lib, pkgs, config, myconfig,  ... }:
+{ lib, pkgs, config,  ... }:
 let
-  secrets = myconfig.env.websites.ludivinecassal.integration;
+  secrets = config.myEnv.websites.ludivinecassal.integration;
   app = pkgs.webapps.ludivinecassal.override { environment = secrets.environment; };
   cfg = config.myServices.websites.ludivinecassal.integration;
   pcfg = config.services.phpApplication;
@@ -8,6 +8,7 @@ in {
   options.myServices.websites.ludivinecassal.integration.enable = lib.mkEnableOption "enable Ludivine's website in integration";
 
   config = lib.mkIf cfg.enable {
+    services.duplyBackup.profiles.ludivinecassal_dev.rootDir = app.varDir;
     services.phpApplication.apps.ludivinecassal_dev = {
       websiteEnv = "integration";
       httpdUser = config.services.httpd.Inte.user;
@@ -22,15 +23,17 @@ in {
         "./bin/console --env=${app.environment} cache:clear --no-warmup"
       ];
       phpOpenbasedir = [ "/tmp" ];
-      phpPool = ''
-        php_admin_value[upload_max_filesize] = 20M
-        php_admin_value[post_max_size] = 20M
-        ;php_admin_flag[log_errors] = on
-        pm = ondemand
-        pm.max_children = 5
-        pm.process_idle_timeout = 60
-        env[SYMFONY_DEBUG_MODE] = "yes"
-      '';
+      phpPool = {
+        "php_admin_value[upload_max_filesize]" = "20M";
+        "php_admin_value[post_max_size]" = "20M";
+        #"php_admin_flag[log_errors]" = "on";
+        "pm" = "ondemand";
+        "pm.max_children" = "5";
+        "pm.process_idle_timeout" = "60";
+      };
+      phpEnv = {
+        SYMFONY_DEBUG_MODE = "yes";
+      };
       phpWatchFiles = [
         config.secrets.fullPaths."webapps/${app.environment}-ludivinecassal"
       ];
@@ -47,7 +50,7 @@ in {
           parameters:
               database_host: ${secrets.mysql.host}
               database_port: ${secrets.mysql.port}
-              database_name: ${secrets.mysql.name}
+              database_name: ${secrets.mysql.database}
               database_user: ${secrets.mysql.user}
               database_password: ${secrets.mysql.password}
               database_server_version: ${pkgs.mariadb.mysqlVersion}
@@ -65,7 +68,7 @@ in {
               ldap_base_dn: 'dc=immae,dc=eu'
               ldap_search_dn: '${secrets.ldap.dn}'
               ldap_search_password: '${secrets.ldap.password}'
-              ldap_search_filter: '${secrets.ldap.search}'
+              ldap_search_filter: '${secrets.ldap.filter}'
           leapt_im:
               binary_path: ${pkgs.imagemagick}/bin
           assetic:
@@ -76,7 +79,7 @@ in {
     ];
 
     services.websites.env.integration.vhostConfs.ludivinecassal_dev = {
-      certName     = "eldiron";
+      certName     = "integration";
       addToCerts  = true;
       hosts       = [ "ludivine.immae.eu" ];
       root        = pcfg.webappDirs.ludivinecassal_dev;