Merge pull request #120125 from BBBSnowball/pr-add-config-nextcloud-imagick-rename-option

nixos/nextcloud: Rename option disableImagemagick to enableImagemagick
This commit is contained in:
Maximilian Bosch 2021-04-23 23:27:34 +02:00 committed by GitHub
commit f62b42f405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -10,7 +10,7 @@ let
extensions = { enabled, all }: extensions = { enabled, all }:
(with all; (with all;
enabled enabled
++ optional (!cfg.disableImagemagick) imagick ++ optional cfg.enableImagemagick imagick
# Optionally enabled depending on caching settings # Optionally enabled depending on caching settings
++ optional cfg.caching.apcu apcu ++ optional cfg.caching.apcu apcu
++ optional cfg.caching.redis redis ++ optional cfg.caching.redis redis
@ -63,6 +63,9 @@ in {
Further details about this can be found in the `Nextcloud`-section of the NixOS-manual Further details about this can be found in the `Nextcloud`-section of the NixOS-manual
(which can be openend e.g. by running `nixos-help`). (which can be openend e.g. by running `nixos-help`).
'') '')
(mkRemovedOptionModule [ "services" "nextcloud" "disableImagemagick" ] ''
Use services.nextcloud.nginx.enableImagemagick instead.
'')
]; ];
options.services.nextcloud = { options.services.nextcloud = {
@ -303,16 +306,14 @@ in {
}; };
}; };
disableImagemagick = mkOption { enableImagemagick = mkEnableOption ''
type = types.bool; Whether to load the ImageMagick module into PHP.
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). 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 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). for some images (e.g. JPEG and PNG).
See https://github.com/nextcloud/server/issues/13099 See https://github.com/nextcloud/server/issues/13099
''; '' // {
default = true;
}; };
caching = { caching = {

View File

@ -51,7 +51,7 @@ in {
nextcloudWithoutMagick = args@{ config, pkgs, lib, ... }: nextcloudWithoutMagick = args@{ config, pkgs, lib, ... }:
lib.mkMerge lib.mkMerge
[ (nextcloud args) [ (nextcloud args)
{ services.nextcloud.disableImagemagick = true; } ]; { services.nextcloud.enableImagemagick = false; } ];
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: let