diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index eb4818756bb1..e2a17c246bd9 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -172,13 +172,13 @@ let type = types.enum (lib.attrNames tempaddrValues); default = cfg.tempAddresses; defaultText = literalExpression ''config.networking.tempAddresses''; - description = '' + description = lib.mdDoc '' When IPv6 is enabled with SLAAC, this option controls the use of temporary address (aka privacy extensions) on this interface. This is used to reduce tracking. See also the global option - , which + [](#opt-networking.tempAddresses), which applies to all interfaces where this is not set. Possible values are: @@ -227,15 +227,19 @@ let { address = "192.168.2.0"; prefixLength = 24; via = "192.168.1.1"; } ]; type = with types; listOf (submodule (routeOpts 4)); - description = '' + description = lib.mdDoc '' List of extra IPv4 static routes that will be assigned to the interface. - If the route type is the default unicast, then the scope - is set differently depending on the value of : - the script-based backend sets it to link, while networkd sets - it to global. + + ::: {.warning} + If the route type is the default `unicast`, then the scope + is set differently depending on the value of {option}`networking.useNetworkd`: + the script-based backend sets it to `link`, while networkd sets + it to `global`. + ::: + If you want consistency between the two implementations, set the scope of the route manually with - networking.interfaces.eth0.ipv4.routes = [{ options.scope = "global"; }] + `networking.interfaces.eth0.ipv4.routes = [{ options.scope = "global"; }]` for example. ''; }; @@ -407,17 +411,10 @@ let description = "generate IPv6 temporary addresses and use these as source addresses in routing"; }; }; - tempaddrDoc = '' - - ${concatStringsSep "\n" (mapAttrsToList (name: { description, ... }: '' - - - "${name}" to ${description}; - - - '') tempaddrValues)} - - ''; + tempaddrDoc = concatStringsSep "\n" + (mapAttrsToList + (name: { description, ... }: ''- `"${name}"` to ${description};'') + tempaddrValues); hostidFile = pkgs.runCommand "gen-hostid" { preferLocalBuild = true; } '' hi="${cfg.hostId}" @@ -1241,17 +1238,15 @@ in type = types.nullOr types.str; default = null; example = "02:00:00:00:00:01"; - description = '' - MAC address to use for the device. If null, then the MAC of the + description = lib.mdDoc '' + MAC address to use for the device. If `null`, then the MAC of the underlying hardware WLAN device is used. INFO: Locally administered MAC addresses are of the form: - - x2:xx:xx:xx:xx:xx - x6:xx:xx:xx:xx:xx - xA:xx:xx:xx:xx:xx - xE:xx:xx:xx:xx:xx - + - x2:xx:xx:xx:xx:xx + - x6:xx:xx:xx:xx:xx + - xA:xx:xx:xx:xx:xx + - xE:xx:xx:xx:xx:xx ''; }; @@ -1287,10 +1282,10 @@ in if ''${config.${opt.enableIPv6}} then "default" else "disabled" ''; type = types.enum (lib.attrNames tempaddrValues); - description = '' + description = lib.mdDoc '' Whether to enable IPv6 Privacy Extensions for interfaces not configured explicitly in - . + [](#opt-networking.interfaces._name_.tempAddress). This sets the ipv6.conf.*.use_tempaddr sysctl for all interfaces. Possible values are: