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
pid, error_log or
daemonize 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 php-fpm.conf 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.
'';
};
};