forked from mirrors/nixpkgs
nixos/phpfpm: add user and group option to each pool
This commit is contained in:
parent
62b774a700
commit
a30a1e2795
|
@ -203,11 +203,10 @@ in
|
|||
};
|
||||
|
||||
services.phpfpm.pools.limesurvey = {
|
||||
inherit user group;
|
||||
extraConfig = ''
|
||||
listen.owner = ${config.services.httpd.user};
|
||||
listen.group = ${config.services.httpd.group};
|
||||
user = ${user};
|
||||
group = ${group};
|
||||
|
||||
env[LIMESURVEY_CONFIG] = ${limesurveyConfig}
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ let
|
|||
|
||||
[${pool}]
|
||||
listen = ${poolOpts.socket}
|
||||
user = ${poolOpts.user}
|
||||
group = ${poolOpts.group}
|
||||
${poolOpts.extraConfig}
|
||||
'';
|
||||
|
||||
|
@ -71,10 +73,19 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
description = "User account under which this pool runs.";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
description = "Group account under which this pool runs.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
example = ''
|
||||
user = nobody
|
||||
pm = dynamic
|
||||
pm.max_children = 75
|
||||
pm.start_servers = 10
|
||||
|
@ -93,6 +104,7 @@ let
|
|||
|
||||
config = {
|
||||
socket = if poolOpts.listen == "" then "${stateDir}/${name}.sock" else poolOpts.listen;
|
||||
group = mkDefault poolOpts.user;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -138,9 +150,10 @@ in {
|
|||
example = literalExample ''
|
||||
{
|
||||
mypool = {
|
||||
user = "php";
|
||||
group = "php";
|
||||
phpPackage = pkgs.php;
|
||||
extraConfig = '''
|
||||
user = nobody
|
||||
pm = dynamic
|
||||
pm.max_children = 75
|
||||
pm.start_servers = 10
|
||||
|
|
Loading…
Reference in a new issue