]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/websites/php-application.nix
Migrate php sessions to redis
[perso/Immae/Config/Nix.git] / modules / websites / php-application.nix
index b9d988665bd327b58f00ead097cd3ea14fd04791..caecb6f85f748d9b9fa5a159af10ce45381cc415 100644 (file)
@@ -33,11 +33,6 @@ in
               Mode to apply to the vardir
               '';
           };
-          phpSession = mkOption {
-            type = bool;
-            default = true;
-            description = "Handle phpsession files separately in vardir";
-          };
           phpListen = mkOption {
             type = nullOr str;
             default = null;
@@ -159,7 +154,6 @@ in
           "listen.group" = icfg.httpdGroup;
           "php_admin_value[open_basedir]" = builtins.concatStringsSep ":" ([icfg.app icfg.varDir] ++ icfg.phpWatchFiles ++ icfg.phpOpenbasedir);
         }
-        // optionalAttrs (icfg.phpSession) { "php_admin_value[session.save_path]" = "${icfg.varDir}/phpSessions"; }
         // icfg.phpPool;
         phpOptions = config.services.phpfpm.phpOptions + icfg.phpOptions;
         inherit (icfg) phpEnv phpPackage;
@@ -208,8 +202,6 @@ in
         deps = [];
         text = optionalString (!isNull icfg.varDir) ''
           install -m ${icfg.mode} -o ${icfg.httpdUser} -g ${icfg.httpdGroup} -d ${icfg.varDir}
-          '' + optionalString (icfg.phpSession) ''
-          install -m 0700 -o ${icfg.httpdUser} -g ${icfg.httpdGroup} -d ${icfg.varDir}/phpSessions
           '' + builtins.concatStringsSep "\n" (attrsets.mapAttrsToList (n: v: ''
             install -m ${v} -o ${icfg.httpdUser} -g ${icfg.httpdGroup} -d ${icfg.varDir}/${n}
             '') icfg.varDirPaths);