From 08e859c8e01f4cda388a69c55f708c8fa4860d05 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 18 Dec 2023 10:40:16 +0100 Subject: [PATCH] nixos/nextcloud: S3: Rename autocreate (a no-op) to verify_bucket_exists C.f. https://github.com/nextcloud/documentation/issues/10436 Co-authored-by: Tom Herbers Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> --- nixos/modules/services/web-apps/nextcloud.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 4b3be5e9fda3..f5da5222d515 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -205,7 +205,7 @@ let 'class' => '\\OC\\Files\\ObjectStore\\S3', 'arguments' => [ 'bucket' => '${s3.bucket}', - 'autocreate' => ${boolToString s3.autocreate}, + 'verify_bucket_exists' => ${boolToString s3.verify_bucket_exists}, 'key' => '${s3.key}', 'secret' => nix_read_secret('s3_secret'), ${optionalString (s3.hostname != null) "'hostname' => '${s3.hostname}',"} @@ -344,6 +344,10 @@ in [ "services" "nextcloud" "extraOptions" ] [ "services" "nextcloud" "settings" ] ) + (mkRenamedOptionModule + [ "services" "nextcloud" "config" "objectstore" "s3" "autocreate" ] + [ "services" "nextcloud" "config" "objectstore" "s3" "verify_bucket_exists" ] + ) ]; options.services.nextcloud = { @@ -654,10 +658,11 @@ in The name of the S3 bucket. ''; }; - autocreate = mkOption { + verify_bucket_exists = mkOption { type = types.bool; + default = true; description = '' - Create the objectstore if it does not exist. + Create the objectstore bucket if it does not exist. ''; }; key = mkOption {