diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-11-17 14:00:39 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-11-17 14:00:45 +0300 |
commit | ef526adf996c4ffc47672f2cac7b95bb12adde21 (patch) | |
tree | 3a761b204bd0c9c2c4792fe74aafe82b0084259c | |
parent | ea6f4b29f2499cedaa78adfb983087b5d461b293 (diff) | |
download | nixsap-ef526adf996c4ffc47672f2cac7b95bb12adde21.tar.gz |
icingaweb2: changed options
* renamed: fpmPool -> php-fpm.pool
* added: php-fpm.package
-rw-r--r-- | modules/apps/icingaweb2.nix | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/modules/apps/icingaweb2.nix b/modules/apps/icingaweb2.nix index afb7712..d8397ec 100644 --- a/modules/apps/icingaweb2.nix +++ b/modules/apps/icingaweb2.nix @@ -2,15 +2,14 @@ let - inherit (lib) types - mkIf mkOption mkEnableOption mkDefault hasPrefix - concatMapStringsSep filterAttrs recursiveUpdate mapAttrsToList - concatStringsSep isString genAttrs attrNames - optionalString mkOptionType any; - inherit (types) - bool str int lines path either - nullOr attrsOf listOf enum submodule unspecified; - inherit (builtins) toString; + inherit (lib) + any attrNames concatMapStringsSep concatStringsSep filterAttrs + genAttrs hasPrefix isString mapAttrsToList mkDefault + mkEnableOption mkIf mkOption mkOptionType mkOverride optionalString + recursiveUpdate ; + inherit (lib.types) + attrsOf bool either enum int lines listOf nullOr package path + str submodule unspecified ; localIcinga = config.nixsap.apps.icinga2.enable; @@ -272,10 +271,17 @@ in { type = path; default = "/icingaweb2"; }; - fpmPool = mkOption { - description = "Options for the PHP FPM pool"; - type = attrsOf unspecified; - default = {}; + php-fpm = { + package = mkOption { + description = "PHP package to use"; + type = package; + default = pkgs.php; + }; + pool = mkOption { + description = "Options for the PHP FPM pool"; + type = attrsOf unspecified; + default = {}; + }; }; resources = mkOption { @@ -358,8 +364,11 @@ in { config = mkIf cfg.enable { nixsap.deployment.keyrings.root = keys; users.users.icingaweb2.extraGroups = mkIf localIcinga [ config.nixsap.apps.icinga2.commandGroup ]; - nixsap.apps.php-fpm.icingaweb2.pool = - recursiveUpdate defaultPool (cfg.fpmPool // { user = cfg.user ;}); + + nixsap.apps.php-fpm.icingaweb2 = mkOverride 0 { + inherit (cfg.php-fpm) package; + pool = recursiveUpdate defaultPool (cfg.php-fpm.pool // { user = cfg.user ;}); + }; nixsap.apps.nginx.http.servers.icingaweb2 = '' ${cfg.nginxServer} |