From 99644df67a6f2d092af91b24c5a21b11b9eb65fb Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Wed, 6 Jan 2010 17:05:57 +0000 Subject: [PATCH] customizable PHPRC svn path=/nixos/trunk/; revision=19267 --- .../web-servers/apache-httpd/default.nix | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix index 91fce4f8dff..fd03b8b6533 100644 --- a/modules/services/web-servers/apache-httpd/default.nix +++ b/modules/services/web-servers/apache-httpd/default.nix @@ -464,6 +464,37 @@ in ''; }; + phpIni = mkOption { + default = '' + ; Needed for PHP's mail() function. + sendmail_path = sendmail -t -i + ''; + + /* + phpIni = pkgs.phpIniBuilder.override { + appendLines = '' + sendmail_path = sendmail -t -i + + zend_extension="${pkgs.phpXdebug}/lib/xdebug.so" + zend_extension_ts="${pkgs.phpXdebug}/lib/xdebug.so" + zend_extension_debug="${pkgs.phpXdebug}/lib/xdebug.so" + xdebug.remote_enable=true + xdebug.remote_host=127.0.0.1 + xdebug.remote_port=9000 + xdebug.remote_handler=dbgp + xdebug.profiler_enable=0 + xdebug.profiler_output_dir="/tmp/xdebug" + xdebug.remote_mode=req + ''; + }; + + */ + description = '' + You can override php default settings by using a customized php.ini file. + Have a look at teh comment above this description to see how to enable Xdebug + ''; + }; + } # Include the options shared between the main server and virtual hosts. @@ -520,11 +551,8 @@ in optional config.networking.defaultMailServer.directDelivery "${pkgs.ssmtp}/sbin" ++ (concatMap (svc: svc.extraServerPath) allSubservices) ); - PHPRC = pkgs.writeText "php.ini" - '' - ; Needed for PHP's mail() function. - sendmail_path = sendmail -t -i - ''; + # only php is using PHPRC. When PHP isn't enabled it doesn't hurt much + PHPRC = mainCfg.phpIni; } // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));