From 390b6108a2cd3cea1134e9dd547dedacc9c13f36 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 1 Mar 2019 16:37:00 +0100 Subject: [PATCH] nixos/nextcloud: don't make phpPackages configurable It needs to match the version in phpfm which is hard coded. So there is no point in being able to change it. --- nixos/modules/services/web-apps/nextcloud.nix | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 64e4a25037f..7c6b0ae81c8 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -5,15 +5,18 @@ with lib; let cfg = config.services.nextcloud; + phpPackage = pkgs.php73; + phpPackages = pkgs.php73Packages; + toKeyValue = generators.toKeyValue { mkKeyValue = generators.mkKeyValueDefault {} " = "; }; phpOptionsExtensions = '' - ${optionalString cfg.caching.apcu "extension=${cfg.phpPackages.apcu}/lib/php/extensions/apcu.so"} - ${optionalString cfg.caching.redis "extension=${cfg.phpPackages.redis}/lib/php/extensions/redis.so"} - ${optionalString cfg.caching.memcached "extension=${cfg.phpPackages.memcached}/lib/php/extensions/memcached.so"} - extension=${cfg.phpPackages.imagick}/lib/php/extensions/imagick.so + ${optionalString cfg.caching.apcu "extension=${phpPackages.apcu}/lib/php/extensions/apcu.so"} + ${optionalString cfg.caching.redis "extension=${phpPackages.redis}/lib/php/extensions/redis.so"} + ${optionalString cfg.caching.memcached "extension=${phpPackages.memcached}/lib/php/extensions/memcached.so"} + extension=${phpPackages.imagick}/lib/php/extensions/imagick.so zend_extension = opcache.so opcache.enable = 1 ''; @@ -95,18 +98,6 @@ in { ''; }; - phpPackages = mkOption { - type = types.attrs; - default = pkgs.php73Packages; - defaultText = "pkgs.php73Packages"; - description = '' - Overridable attribute of the PHP packages set to use. If any caching - module is enabled, it will be taken from here. Therefore it should - match the version of PHP given to - services.phpfpm.phpPackage. - ''; - }; - phpOptions = mkOption { type = types.attrsOf types.str; default = { @@ -367,7 +358,7 @@ in { phpOptions))); in { phpOptions = phpOptionsExtensions; - phpPackage = pkgs.php73; + phpPackage = phpPackage; listen = "/run/phpfpm/nextcloud"; extraConfig = '' listen.owner = nginx