about summary refs log tree commit diff
path: root/nixos/doc
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2023-08-05 11:23:58 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2023-08-05 11:58:11 +0200
commit2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76 (patch)
treef53c20b276011a481b9c34a7332eb09e1deb37e5 /nixos/doc
parented02e79bbe031a7ce9cf863660f10d3ef70b8636 (diff)
downloadnixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar.gz
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar.bz2
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar.lz
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar.xz
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.tar.zst
nixlib-2ddb1453e6fadb7ac10d3c9996a9f3f7356deb76.zip
nixos/nextcloud: make php settings additive
Right now, the settings aren't additive which means that when I do

    services.nextcloud.phpOptions."opcache.interned_strings_buffer = "23";

all other options are discarded because of how the module system works.

This isn't very nice in this case, though because wanting to override
a single option doesn't mean I want to discard the rest of the -
reasonable - defaults. Hence, the settings are showed as default in the
option's manual section, but are added with normal priority.

That means, to override _all_ options at once, an expression like

    services.nextcloud.phpOptions = mkForce {
      /* ... */
    };

is needed. This is also way more intuitive IMHO because the `mkForce`
explicitly tells that everything will be modified.

Also, APCu enable and the memory & file-size limits are also written
into `services.nextcloud.phpOptions` rather than adding them
silently before passing all options to the PHP package. This has the
benefit that users will realize on evaluation time that they configured
options that would otherwise be set by the module on its own.
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index 4e8bd3642813..05ef05567543 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -72,6 +72,22 @@
 
 - The [services.caddy.acmeCA](#opt-services.caddy.acmeCA) option now defaults to `null` instead of `"https://acme-v02.api.letsencrypt.org/directory"`, to use all of Caddy's default ACME CAs and enable Caddy's automatic issuer fallback feature by default, as recommended by upstream.
 
+- The default priorities of [`services.nextcloud.phpOptions`](#opt-services.nextcloud.phpOptions) have changed. This means that e.g.
+  `services.nextcloud.phpOptions."opcache.interned_strings_buffer" = "23";` doesn't discard all of the other defaults from this option
+  anymore. The attribute values of `phpOptions` are still defaults, these can be overridden as shown here.
+
+  To override all of the options (including including `upload_max_filesize`, `post_max_size`
+  and `memory_limit` which all point to [`services.nextcloud.maxUploadSize`](#opt-services.nextcloud.maxUploadSize)
+  by default) can be done like this:
+
+  ```nix
+  {
+    services.nextcloud.phpOptions = lib.mkForce {
+      /* ... */
+    };
+  }
+  ```
+
 - `php80` is no longer supported due to upstream not supporting this version anymore.
 
 - PHP now defaults to PHP 8.2, updated from 8.1.