From 0ff63a3fa6f5a3da5bc7d85f6fe0cc5f87df94b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20B=C3=A4renz?= Date: Mon, 11 Jan 2021 22:15:22 +0100 Subject: [PATCH] nixos/nextcloud: Conditionally enable caching PHP extensions --- nixos/modules/services/web-apps/nextcloud.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index a2d6d48fd40a..1b643bd3260a 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -8,8 +8,14 @@ let phpPackage = pkgs.php74.buildEnv { extensions = { enabled, all }: - enabled - ++ (with all; [ apcu redis memcached imagick ]) # Necessary for vanilla nextcloud + (with all; + enabled + ++ [ imagick ] # Always enabled + # Optionally enabled depending on caching settings + ++ optional cfg.caching.apcu apcu + ++ optional cfg.caching.redis redis + ++ optional cfg.caching.memcached memcached + ) ++ cfg.phpExtraExtensions all; # Enabled by user extraConfig = toKeyValue phpOptions; };