nixos/roundcube: adjust maxAttachmentSize, clarify documentation

This commit is contained in:
NotAShelf 2024-07-04 19:51:32 +03:00
parent a1ecdd6b1a
commit 48d1d14633
No known key found for this signature in database
GPG Key ID: AF26552424E53993
2 changed files with 10 additions and 4 deletions

View File

@ -174,6 +174,8 @@
- The `services.patroni.raft` option has been removed, as Raft has been [deprecated by upstream since 3.0.0](https://github.com/patroni/patroni/blob/master/docs/releases.rst#version-300)
- `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@ -93,13 +93,17 @@ in
maxAttachmentSize = mkOption {
type = types.int;
default = 18;
apply = configuredMaxAttachmentSize: "${toString (configuredMaxAttachmentSize * 1.37)}M";
description = ''
The maximum attachment size in MB.
Note: Since roundcube only uses 70% of max upload values configured in php
30% is added automatically to [](#opt-services.roundcube.maxAttachmentSize).
[upstream issue comment]: https://github.com/roundcube/roundcubemail/issues/7979#issuecomment-808879209
::: {.note}
Since there is some overhead in base64 encoding applied to attachments, + 37% will be added
to the value set in this option in order to offset the overhead. For example, setting
`maxAttachmentSize` to `100` would result in `137M` being the real value in the configuration.
See [upstream issue comment] for more details on the motivations behind this.
:::
'';
apply = configuredMaxAttachmentSize: "${toString (configuredMaxAttachmentSize * 1.3)}M";
};
configureNginx = lib.mkOption {