From 8cdabf9cf8ce16babb2342e39bd44e85fc3d8f28 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 28 Dec 2023 17:38:33 +0100 Subject: [PATCH] nixos/sysctl: cleanup - Use `options = {` instead of repeating `options` for every option - Change the description of "net.core.rmem_max" slightly to match the kernel documentation --- nixos/modules/config/sysctl.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index b779f12aca30..bedba984a3c2 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -31,16 +31,18 @@ in }; in types.submodule { freeformType = types.attrsOf sysctlOption; - options."net.core.rmem_max" = mkOption { - type = types.nullOr highestValueType; - default = null; - description = lib.mdDoc "The maximum socket receive buffer size. In case of conflicting values, the highest will be used."; - }; + options = { + "net.core.rmem_max" = mkOption { + type = types.nullOr highestValueType; + default = null; + description = lib.mdDoc "The maximum receive socket buffer size in bytes. In case of conflicting values, the highest will be used."; + }; - options."net.core.wmem_max" = mkOption { - type = types.nullOr highestValueType; - default = null; - description = lib.mdDoc "The maximum socket send buffer size. In case of conflicting values, the highest will be used."; + "net.core.wmem_max" = mkOption { + type = types.nullOr highestValueType; + default = null; + description = lib.mdDoc "The maximum send socket buffer size in bytes. In case of conflicting values, the highest will be used."; + }; }; }; default = {};