X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fchloe%2Fnew.nix;h=0d5c7fbf500ad518c25020232613c9e6664fb926;hb=bbea22c02b6c059a6be1064391f06737ee244ba6;hpb=17c6ac45b0c4333dc774228a2837699de9443f8d;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/chloe/new.nix b/modules/private/websites/chloe/new.nix index 344810f..0d5c7fb 100644 --- a/modules/private/websites/chloe/new.nix +++ b/modules/private/websites/chloe/new.nix @@ -4,7 +4,6 @@ let cfg = config.myServices.websites.chloe.new; ftpRoot = "/var/lib/chloe_new"; webRoot = "${ftpRoot}/wordpress"; - sessionDir = "${ftpRoot}/sessions"; in { options.myServices.websites.chloe.new.enable = lib.mkEnableOption "enable Chloe's new website in integration"; @@ -17,10 +16,10 @@ in { "listen.group" = config.services.httpd.Inte.group; "php_admin_value[open_basedir]" = builtins.concatStringsSep ":" [ webRoot - sessionDir "/tmp" ]; - "php_admin_value[session.save_path]" = sessionDir; + "php_admin_value[session.save_handler]" = "redis"; + "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Chloe:NewIntegration:'"; "php_admin_value[upload_max_filesize]" = "20M"; "php_admin_value[post_max_size]" = "20M"; #"php_admin_flag[log_errors]" = "on"; @@ -28,13 +27,13 @@ in { "pm.max_children" = "5"; "pm.process_idle_timeout" = "60"; }; - phpPackage = pkgs.php74; + phpPackage = pkgs.php74.withExtensions({ enabled, all }: enabled ++ [all.redis]); }; system.activationScripts.chloe_new_integration = { deps = ["users"]; text = '' - install -m 0700 -o ${config.services.httpd.Inte.user} -g ${config.services.httpd.Inte.group} -d ${ftpRoot} ${sessionDir} + install -m 0700 -o ${config.services.httpd.Inte.user} -g ${config.services.httpd.Inte.group} -d ${ftpRoot} ''; };