Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/nextcloud: Rename option disableImagemagick to enableImagemagick #120125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let
extensions = { enabled, all }:
(with all;
enabled
++ optional (!cfg.disableImagemagick) imagick
++ optional cfg.enableImagemagick imagick
# Optionally enabled depending on caching settings
++ optional cfg.caching.apcu apcu
++ optional cfg.caching.redis redis
Expand Down Expand Up @@ -63,6 +63,9 @@ in {
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`).
'')
(mkRemovedOptionModule [ "services" "nextcloud" "disableImagemagick" ] ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never made it into a stable release so you don't need this.

Use services.nextcloud.nginx.enableImagemagick instead.
'')
];

options.services.nextcloud = {
Expand Down Expand Up @@ -303,16 +306,14 @@ in {
};
};

disableImagemagick = mkOption {
type = types.bool;
default = false;
description = ''
Whether to not load the ImageMagick module into PHP.
enableImagemagick = mkEnableOption ''
Whether to 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
'';
'' // {
default = true;
};

caching = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ in {
nextcloudWithoutMagick = args@{ config, pkgs, lib, ... }:
lib.mkMerge
[ (nextcloud args)
{ services.nextcloud.disableImagemagick = true; } ];
{ services.nextcloud.enableImagemagick = false; } ];
};

testScript = { nodes, ... }: let
Expand Down