0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #115372 from BBBSnowball/pr-add-config-nextcloud-imagick

nixos/nextcloud: Conditionally enable ImageMagick PHP extension
This commit is contained in:
Maximilian Bosch 2021-03-11 12:45:17 +01:00 committed by GitHub
commit 7ecc3b0684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 4 deletions

View file

@ -10,7 +10,7 @@ let
extensions = { enabled, all }:
(with all;
enabled
++ [ imagick ] # Always enabled
++ optional (!cfg.disableImagemagick) imagick
# Optionally enabled depending on caching settings
++ optional cfg.caching.apcu apcu
++ optional cfg.caching.redis redis
@ -303,6 +303,18 @@ in {
};
};
disableImagemagick = mkOption {
type = types.bool;
default = false;
description = ''
Whether to not load the ImageMagick module into PHP.
This is used by the theming app and for generating previews of certain images (e.g. SVG and HEIF).
You may want to disable it for increased security. In that case, previews will still be available
for some images (e.g. JPEG and PNG).
See https://github.com/nextcloud/server/issues/13099
'';
};
caching = {
apcu = mkOption {
type = types.bool;