summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/phpfpm/pool-options.nix
blob: d9ad7eff71f2c07f32c7985c9afb33e56ec1f4f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib, config }:

let
  fpmCfg = config.services.phpfpm;
in

with lib; {

  options = {

    listen = mkOption {
      type = types.str;
      example = "/path/to/unix/socket";
      description = ''
        The address on which to accept FastCGI requests.
      '';
    };

    phpPackage = mkOption {
      type = types.package;
      default = fpmCfg.phpPackage;
      defaultText = "config.services.phpfpm.phpPackage";
      description = ''
        The PHP package to use for running this PHP-FPM pool.
      '';
    };

    phpOptions = mkOption {
      type = types.lines;
      default = fpmCfg.phpOptions;
      defaultText = "config.services.phpfpm.phpOptions";
      description = ''
        "Options appended to the PHP configuration file <filename>php.ini</filename> used for this PHP-FPM pool."
      '';
    };

    extraConfig = mkOption {
      type = types.lines;
      example = ''
        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 = ''
        Extra lines that go into the pool configuration.
        See the documentation on <literal>php-fpm.conf</literal> for
        details on configuration directives.
      '';
    };
  };
}