summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2016-09-29 13:14:32 +0200
committerGitHub <noreply@github.com>2016-09-29 13:14:32 +0200
commit4d3282a8fe3a2dc8332c5bb2090e33313299472c (patch)
tree958e0512dada6f189020a84ec7b0daa86197146d
parent5df3ec85d8e9afd780fa80b9f96e496a61f699c1 (diff)
parentb14ecbb96f4ca6a1f89b703b9f28c87ed557e6fc (diff)
downloadnixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar.gz
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar.bz2
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar.lz
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar.xz
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.tar.zst
nixlib-4d3282a8fe3a2dc8332c5bb2090e33313299472c.zip
Merge pull request #18993 from ericsagnes/mod/php-fpm
php-fpm module: cleanup
-rw-r--r--nixos/modules/services/web-servers/phpfpm/default.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix
index 29cfbb8e9a08..a3a23b222fbb 100644
--- a/nixos/modules/services/web-servers/phpfpm/default.nix
+++ b/nixos/modules/services/web-servers/phpfpm/default.nix
@@ -42,7 +42,7 @@ in {
         default = "";
         description = ''
           Extra configuration that should be put in the global section of
-          the PHP FPM configuration file. Do not specify the options
+          the PHP-FPM configuration file. Do not specify the options
           <literal>pid</literal>, <literal>error_log</literal> or
           <literal>daemonize</literal> here, since they are generated by
           NixOS.
@@ -54,7 +54,7 @@ in {
         default = pkgs.php;
         defaultText = "pkgs.php";
         description = ''
-          The PHP package to use for running the FPM service.
+          The PHP package to use for running the PHP-FPM service.
         '';
       };
 
@@ -86,7 +86,7 @@ in {
           }
         '';
         description = ''
-          A mapping between PHP FPM pool names and their configurations.
+          A mapping between PHP-FPM pool names and their configurations.
           See the documentation on <literal>php-fpm.conf</literal> for
           details on configuration directives. If no pools are defined,
           the phpfpm service is disabled.
@@ -98,8 +98,24 @@ in {
           inherit lib;
         }));
         default = {};
+        example = literalExample ''
+         {
+           mypool = {
+             listen = "/path/to/unix/socket";
+             extraConfig = '''
+               user = nobody
+               pm = dynamic
+               pm.max_children = 75
+               pm.start_servers = 10
+               pm.min_spare_servers = 5
+               pm.max_spare_servers = 20
+               pm.max_requests = 500
+             ''';
+           }
+         }'';
         description = ''
-          If no pools are defined, the phpfpm service is disabled.
+          PHP-FPM pools. If no pools or poolConfigs are defined, the PHP-FPM
+          service is disabled.
         '';
       };
     };