From 2e751c0772b9d48ff6923569adfa661b030ab6a2 Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 28 Jul 2022 23:19:15 +0200 Subject: treewide: automatically md-convert option descriptions the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like and , so any option using such tags will not be converted at all. --- .../modules/services/networking/networkmanager.nix | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'nixos/modules/services/networking/networkmanager.nix') diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 242afd548df3..7abdf16b1534 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -157,10 +157,10 @@ in { enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to use NetworkManager to obtain an IP address and other configuration for all network interfaces that are not manually - configured. If enabled, a group networkmanager + configured. If enabled, a group `networkmanager` will be created. Add all users that should have permission to change network settings to this group. ''; @@ -243,7 +243,7 @@ in { in types.listOf networkManagerPluginPackage; default = [ ]; - description = '' + description = lib.mdDoc '' List of NetworkManager plug-ins to enable. Some plug-ins are enabled by the NetworkManager module by default. ''; @@ -252,7 +252,7 @@ in { dhcp = mkOption { type = types.enum [ "dhcpcd" "internal" ]; default = "internal"; - description = '' + description = lib.mdDoc '' Which program (or internal library) should be used for DHCP. ''; }; @@ -260,7 +260,7 @@ in { firewallBackend = mkOption { type = types.enum [ "iptables" "nftables" "none" ]; default = "iptables"; - description = '' + description = lib.mdDoc '' Which firewall backend should be used for configuring masquerading with shared mode. If set to none, NetworkManager doesn't manage the configuration at all. ''; @@ -269,7 +269,7 @@ in { logLevel = mkOption { type = types.enum [ "OFF" "ERR" "WARN" "INFO" "DEBUG" "TRACE" ]; default = "WARN"; - description = '' + description = lib.mdDoc '' Set the default logging verbosity level. ''; }; @@ -277,7 +277,7 @@ in { appendNameservers = mkOption { type = types.listOf types.str; default = []; - description = '' + description = lib.mdDoc '' A list of name servers that should be appended to the ones configured in NetworkManager or received by DHCP. ''; @@ -286,7 +286,7 @@ in { insertNameservers = mkOption { type = types.listOf types.str; default = []; - description = '' + description = lib.mdDoc '' A list of name servers that should be inserted before the ones configured in NetworkManager or received by DHCP. ''; @@ -300,16 +300,16 @@ in { backend = mkOption { type = types.enum [ "wpa_supplicant" "iwd" ]; default = "wpa_supplicant"; - description = '' + description = lib.mdDoc '' Specify the Wi-Fi backend used for the device. - Currently supported are or (experimental). + Currently supported are {option}`wpa_supplicant` or {option}`iwd` (experimental). ''; }; powersave = mkOption { type = types.nullOr types.bool; default = null; - description = '' + description = lib.mdDoc '' Whether to enable Wi-Fi power saving. ''; }; @@ -317,7 +317,7 @@ in { scanRandMacAddress = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to enable MAC address randomization of a Wi-Fi device during scanning. ''; @@ -348,7 +348,7 @@ in { options = { source = mkOption { type = types.path; - description = '' + description = lib.mdDoc '' Path to the hook script. ''; }; @@ -380,7 +380,7 @@ in { '''; type = "basic"; } ]''; - description = '' + description = lib.mdDoc '' A list of scripts which will be executed in response to network events. ''; }; @@ -401,10 +401,10 @@ in { enableFccUnlock = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enable FCC unlock procedures. Since release 1.18.4, the ModemManager daemon no longer automatically performs the FCC unlock procedure by default. See - the docs + [the docs](https://modemmanager.org/docs/modemmanager/fcc-unlock/) for more details. ''; }; -- cgit v1.2.3