···1336 the npm install step prunes dev dependencies.
1337 </para>
1338 </listitem>
000000001339 </itemizedlist>
1340 </section>
1341</section>
···1336 the npm install step prunes dev dependencies.
1337 </para>
1338 </listitem>
1339+ <listitem>
1340+ <para>
1341+ boot.kernel.sysctl is defined as a freeformType and adds a
1342+ custom merge option for <quote>net.core.rmem_max</quote>
1343+ (taking the highest value defined to avoid conflicts between 2
1344+ services trying to set that value)
1345+ </para>
1346+ </listitem>
1347 </itemizedlist>
1348 </section>
1349</section>
+2
nixos/doc/manual/release-notes/rl-2211.section.md
···395396- The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies.
39700398<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
···395396- The `nodePackages` package set now defaults to the LTS release in the `nodejs` package again, instead of being pinned to `nodejs-14_x`. Several updates to node2nix have been made for compatibility with newer Node.js and npm versions and a new `postRebuild` hook has been added for packages to perform extra build steps before the npm install step prunes dev dependencies.
397398+- boot.kernel.sysctl is defined as a freeformType and adds a custom merge option for "net.core.rmem_max" (taking the highest value defined to avoid conflicts between 2 services trying to set that value)
399+400<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+15-1
nixos/modules/config/sysctl.nix
···21 options = {
2223 boot.kernel.sysctl = mkOption {
0000000000000024 default = {};
25 example = literalExpression ''
26 { "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
27 '';
28- type = types.attrsOf sysctlOption;
29 description = lib.mdDoc ''
30 Runtime parameters of the Linux kernel, as set by
31 {manpage}`sysctl(8)`. Note that sysctl
···35 parameter may be a string, integer, boolean, or null
36 (signifying the option will not appear at all).
37 '';
038 };
3940 };
···21 options = {
2223 boot.kernel.sysctl = mkOption {
24+ type = types.submodule {
25+ freeformType = types.attrsOf sysctlOption;
26+ options."net.core.rmem_max" = mkOption {
27+ type = types.nullOr types.ints.unsigned // {
28+ merge = loc: defs:
29+ foldl
30+ (a: b: if b.value == null then null else lib.max a b.value)
31+ 0
32+ (filterOverrides defs);
33+ };
34+ default = null;
35+ description = lib.mdDoc "The maximum socket receive buffer size. In case of conflicting values, the highest will be used.";
36+ };
37+ };
38 default = {};
39 example = literalExpression ''
40 { "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
41 '';
042 description = lib.mdDoc ''
43 Runtime parameters of the Linux kernel, as set by
44 {manpage}`sysctl(8)`. Note that sysctl
···48 parameter may be a string, integer, boolean, or null
49 (signifying the option will not appear at all).
50 '';
51+52 };
5354 };
+1-1
nixos/modules/services/torrent/transmission.nix
···431 # https://trac.transmissionbt.com/browser/trunk/libtransmission/tr-udp.c?rev=11956.
432 # at least up to the values hardcoded here:
433 (mkIf cfg.settings.utp-enabled {
434- "net.core.rmem_max" = mkDefault "4194304"; # 4MB
435 "net.core.wmem_max" = mkDefault "1048576"; # 1MB
436 })
437 (mkIf cfg.performanceNetParameters {
···431 # https://trac.transmissionbt.com/browser/trunk/libtransmission/tr-udp.c?rev=11956.
432 # at least up to the values hardcoded here:
433 (mkIf cfg.settings.utp-enabled {
434+ "net.core.rmem_max" = mkDefault 4194304; # 4MB
435 "net.core.wmem_max" = mkDefault "1048576"; # 1MB
436 })
437 (mkIf cfg.performanceNetParameters {