php-fpm module: cleanup

- Added example for the pool option
- Unified PHP-FPM spelling
This commit is contained in:
Eric Sagnes 2016-09-27 10:20:22 +09:00
parent cdec20ac58
commit b14ecbb96f

View File

@ -42,7 +42,7 @@ in {
default = ""; default = "";
description = '' description = ''
Extra configuration that should be put in the global section of 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>pid</literal>, <literal>error_log</literal> or
<literal>daemonize</literal> here, since they are generated by <literal>daemonize</literal> here, since they are generated by
NixOS. NixOS.
@ -54,7 +54,7 @@ in {
default = pkgs.php; default = pkgs.php;
defaultText = "pkgs.php"; defaultText = "pkgs.php";
description = '' 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 = '' 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 See the documentation on <literal>php-fpm.conf</literal> for
details on configuration directives. If no pools are defined, details on configuration directives. If no pools are defined,
the phpfpm service is disabled. the phpfpm service is disabled.
@ -98,8 +98,24 @@ in {
inherit lib; inherit lib;
})); }));
default = {}; 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 = '' 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.
''; '';
}; };
}; };