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
This commit is contained in:
Luflosi 2023-12-28 17:38:33 +01:00
parent e2b40f6834
commit 8cdabf9cf8
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0

View file

@ -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 = {};