summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/nextcloud.nix
diff options
context:
space:
mode:
authormitchmindtree <mail@mitchellnordine.com>2021-10-05 17:07:44 +1000
committermitchmindtree <mail@mitchellnordine.com>2021-10-05 17:07:44 +1000
commitc5d08ebee1805668b2a3945f0f5b2e06a1e03412 (patch)
treefcb49d0720cb17b5f7f7da6c1e4835c7d07e1f3c /nixos/modules/services/web-apps/nextcloud.nix
parenta539a82707bad3c644fe5537300808e040540ae5 (diff)
downloadnixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar.gz
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar.bz2
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar.lz
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar.xz
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.tar.zst
nixpkgs-c5d08ebee1805668b2a3945f0f5b2e06a1e03412.zip
nixos/nextcloud: Fix ambiguity in `objectstoreConfig` string
Previously this was a little tricky to read and had the potential to
cause some ambiguity in string parsing.
Diffstat (limited to 'nixos/modules/services/web-apps/nextcloud.nix')
-rw-r--r--nixos/modules/services/web-apps/nextcloud.nix30
1 files changed, 16 insertions, 14 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix
index e9673f8367b..a247c8b636d 100644
--- a/nixos/modules/services/web-apps/nextcloud.nix
+++ b/nixos/modules/services/web-apps/nextcloud.nix
@@ -564,20 +564,22 @@ in {
           c = cfg.config;
           writePhpArrary = a: "[${concatMapStringsSep "," (val: ''"${toString val}"'') a}]";
           requiresReadSecretFunction = c.dbpassFile != null || c.objectstore.s3.enable;
-          objectstoreConfig = let s3 = c.objectstore.s3; in optionalString s3.enable '''objectstore' => [
-            'class' => '\\OC\\Files\\ObjectStore\\S3',
-            'arguments' => [
-              'bucket' => '${s3.bucket}',
-              'autocreate' => ${boolToString s3.autocreate},
-              'key' => '${s3.key}',
-              'secret' => nix_read_secret('${s3.secretFile}'),
-              ${optionalString (s3.hostname != null) "'hostname' => '${s3.hostname}',"}
-              ${optionalString (s3.port != null) "'port' => ${toString s3.port},"}
-              'use_ssl' => ${boolToString s3.useSsl},
-              ${optionalString (s3.region != null) "'region' => '${s3.region}',"}
-              'use_path_style' => ${boolToString s3.usePathStyle},
-            ],
-          ]'';
+          objectstoreConfig = let s3 = c.objectstore.s3; in optionalString s3.enable ''
+            'objectstore' => [
+              'class' => '\\OC\\Files\\ObjectStore\\S3',
+              'arguments' => [
+                'bucket' => '${s3.bucket}',
+                'autocreate' => ${boolToString s3.autocreate},
+                'key' => '${s3.key}',
+                'secret' => nix_read_secret('${s3.secretFile}'),
+                ${optionalString (s3.hostname != null) "'hostname' => '${s3.hostname}',"}
+                ${optionalString (s3.port != null) "'port' => ${toString s3.port},"}
+                'use_ssl' => ${boolToString s3.useSsl},
+                ${optionalString (s3.region != null) "'region' => '${s3.region}',"}
+                'use_path_style' => ${boolToString s3.usePathStyle},
+              ],
+            ]
+          '';
 
           overrideConfig = pkgs.writeText "nextcloud-config.php" ''
             <?php