From 3e60871330bde389d89c4d6585a259109c716960 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 27 Apr 2022 23:46:02 -0700 Subject: [PATCH 01/55] lib/systems/platforms.nix: use "32" instead of "o32" for mips32 ABI There is only one ABI for 32-bit MIPS chips. Before mips64, it didn't really have a name. The 64-bit MIPS ABI comes in two flavors, "n64" and "n32". It is commonplace to refer to the old 32-bit ABI as "o32" (MIPS and SGI documents do this). However, when configuring gcc, one must use --with-abi=32, not --with-abi=o32. Let's keep GCC happy with this commit. --- lib/systems/platforms.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index d65ff6487b7a..c1442556d7e7 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -490,8 +490,8 @@ rec { }; # can execute on 32bit chip - gcc_mips32r2_o32 = { gcc = { arch = "mips32r2"; abi = "o32"; }; }; - gcc_mips32r6_o32 = { gcc = { arch = "mips32r6"; abi = "o32"; }; }; + gcc_mips32r2_o32 = { gcc = { arch = "mips32r2"; abi = "32"; }; }; + gcc_mips32r6_o32 = { gcc = { arch = "mips32r6"; abi = "32"; }; }; gcc_mips64r2_n32 = { gcc = { arch = "mips64r2"; abi = "n32"; }; }; gcc_mips64r6_n32 = { gcc = { arch = "mips64r6"; abi = "n32"; }; }; gcc_mips64r2_64 = { gcc = { arch = "mips64r2"; abi = "64"; }; }; From 4ea0a92d47199cd0eca8af77af3a79c29cb1c3dc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 7 Jul 2022 20:29:34 +0000 Subject: [PATCH 02/55] clapper: 0.5.1 -> 0.5.2 --- pkgs/applications/video/clapper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/clapper/default.nix b/pkgs/applications/video/clapper/default.nix index 1600b1b4d8bb..9e8e88ecfbf3 100644 --- a/pkgs/applications/video/clapper/default.nix +++ b/pkgs/applications/video/clapper/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation rec { pname = "clapper"; - version = "0.5.1"; + version = "0.5.2"; src = fetchFromGitHub { owner = "Rafostar"; repo = pname; rev = version; - sha256 = "sha256-o68IdI20gSwWCPI0g/BhUGF5ro6srXMy0JD1EgmY5ck="; + sha256 = "sha256-s+qdTq3/pHHstwr1W3Hs2Zje++iJFHM6hQTFoZD43bY="; }; nativeBuildInputs = [ From 55ac327102cf9acc731d7bbd484731592b493586 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 8 Jul 2022 06:26:52 +0000 Subject: [PATCH 03/55] cmark-gfm: 0.29.0.gfm.3 -> 0.29.0.gfm.4 --- pkgs/development/libraries/cmark-gfm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cmark-gfm/default.nix b/pkgs/development/libraries/cmark-gfm/default.nix index 599ac2b2e7b0..ecfdda3192f4 100644 --- a/pkgs/development/libraries/cmark-gfm/default.nix +++ b/pkgs/development/libraries/cmark-gfm/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec { pname = "cmark-gfm"; - version = "0.29.0.gfm.3"; + version = "0.29.0.gfm.4"; src = fetchFromGitHub { owner = "github"; repo = "cmark-gfm"; rev = version; - sha256 = "sha256-V3XegSjqKLCMpfnoYHr9/r5fSC2CC7A2jXkAcHUt7eA="; + sha256 = "sha256-touFLrxVQvX75JXYLADq84yIuQ1kl43fVUvZ4qGYoMM="; }; nativeBuildInputs = [ cmake ]; From d1407dbf2dfcf26104571a14835d2a57cd9660cb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 11 Jul 2022 07:36:07 +0000 Subject: [PATCH 04/55] frp: 0.43.0 -> 0.44.0 --- pkgs/tools/networking/frp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/frp/default.nix b/pkgs/tools/networking/frp/default.nix index 864893b1467a..682cb3a55407 100644 --- a/pkgs/tools/networking/frp/default.nix +++ b/pkgs/tools/networking/frp/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "frp"; - version = "0.43.0"; + version = "0.44.0"; src = fetchFromGitHub { owner = "fatedier"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ked1emPx9pOz54s4ViutY41s7sQG+IjX/eZJkX15IGo="; + sha256 = "sha256-DH+MOMsDdW+GGrxhkXhC+5D+2IsAZwByd0FjNT+i+og="; }; vendorSha256 = "sha256-5ljUbEvynNo1AxGpJq9B0bTFgzVfgVZbsqXcPBERLMI="; From f1a08f54f0098aa2ded52d6465b532ef70ec039e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 4 Mar 2022 14:06:29 +0800 Subject: [PATCH 05/55] nixos/mautrix-telegram: add lottieconverter to path --- nixos/modules/services/matrix/mautrix-telegram.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/matrix/mautrix-telegram.nix b/nixos/modules/services/matrix/mautrix-telegram.nix index 794c4dd9ddcd..88e5c38f7163 100644 --- a/nixos/modules/services/matrix/mautrix-telegram.nix +++ b/nixos/modules/services/matrix/mautrix-telegram.nix @@ -125,6 +125,7 @@ in { wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ cfg.serviceDependencies; after = [ "network-online.target" ] ++ cfg.serviceDependencies; + path = [ pkgs.lottieconverter ]; preStart = '' # Not all secrets can be passed as environment variable (yet) From 2e1845a7458f4e205d5c4ffe476c6a2d1225fcdb Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 23 Jul 2022 16:27:03 +0800 Subject: [PATCH 06/55] lottieconverter: 0.1.1 -> 0.2 --- pkgs/tools/misc/lottieconverter/default.nix | 42 ++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/misc/lottieconverter/default.nix b/pkgs/tools/misc/lottieconverter/default.nix index ad2721c36e3a..e7ee6e9b74f2 100644 --- a/pkgs/tools/misc/lottieconverter/default.nix +++ b/pkgs/tools/misc/lottieconverter/default.nix @@ -1,34 +1,42 @@ -{ lib, stdenv, fetchFromGitHub, libpng, rlottie, zlib }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libpng +, rlottie +, giflib +}: -stdenv.mkDerivation rec { - pname = "LottieConverter"; - version = "0.1.1"; +stdenv.mkDerivation (finalAttrs: { + pname = "lottieconverter"; + version = "0.2"; src = fetchFromGitHub { owner = "sot-tech"; - repo = pname; - rev = "r${version}"; - hash = "sha256-lAGzh6B2js2zDuN+1U8CZnse09RJGZRXbtmsheGKuYU="; + repo = finalAttrs.pname; + rev = "r${finalAttrs.version}"; + hash = "sha256-oCFQsOQbWzmzClaTOeuEtGo7uXoKYtaJuSLLgqAQP1M="; }; - buildInputs = [ libpng rlottie zlib ]; - makeFlags = [ "CONF=Release" ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libpng rlottie giflib ]; + + cmakeFlags = [ + "-DSYSTEM_RL=1" + "-DSYSTEM_GL=1" + ]; installPhase = '' runHook preInstall - - mkdir -p $out/bin - cp -v dist/Release/GNU-Linux/lottieconverter $out/bin/ - + install -Dm755 lottieconverter "$out/bin/lottieconverter" runHook postInstall ''; meta = with lib; { homepage = "https://github.com/sot-tech/LottieConverter/"; description = "Lottie converter utility"; - license = licenses.lgpl21Plus; + license = licenses.bsd3; platforms = platforms.all; - maintainers = with maintainers; [ CRTified ]; - broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/lottieconverter.x86_64-darwin + maintainers = with maintainers; [ CRTified nickcao ]; }; -} +}) From 8a79dfd94a77a07cc5afab2e2aaeb7b99f0b8039 Mon Sep 17 00:00:00 2001 From: pennae Date: Tue, 19 Jul 2022 15:05:45 +0200 Subject: [PATCH 07/55] nixos/config: invariant option docs MD conversions --- nixos/modules/config/appstream.nix | 4 ++-- nixos/modules/config/fonts/fontdir.nix | 8 +++---- nixos/modules/config/locale.nix | 19 ++++++++-------- nixos/modules/config/nsswitch.nix | 24 ++++++++++---------- nixos/modules/config/pulseaudio.nix | 26 +++++++++++----------- nixos/modules/config/unix-odbc-drivers.nix | 6 ++--- nixos/modules/config/xdg/autostart.nix | 4 ++-- nixos/modules/config/xdg/icons.nix | 4 ++-- nixos/modules/config/xdg/menus.nix | 4 ++-- nixos/modules/config/xdg/sounds.nix | 4 ++-- 10 files changed, 51 insertions(+), 52 deletions(-) diff --git a/nixos/modules/config/appstream.nix b/nixos/modules/config/appstream.nix index a72215c2f561..5b48f6e1705d 100644 --- a/nixos/modules/config/appstream.nix +++ b/nixos/modules/config/appstream.nix @@ -6,9 +6,9 @@ with lib; appstream.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install files to support the - AppStream metadata specification. + [AppStream metadata specification](https://www.freedesktop.org/software/appstream/docs/index.html). ''; }; }; diff --git a/nixos/modules/config/fonts/fontdir.nix b/nixos/modules/config/fonts/fontdir.nix index 560918302ca6..30e0dfe2566a 100644 --- a/nixos/modules/config/fonts/fontdir.nix +++ b/nixos/modules/config/fonts/fontdir.nix @@ -30,9 +30,9 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to create a directory with links to all fonts in - /run/current-system/sw/share/X11/fonts. + {file}`/run/current-system/sw/share/X11/fonts`. ''; }; @@ -40,9 +40,9 @@ in type = types.bool; default = config.programs.xwayland.enable; defaultText = literalExpression "config.programs.xwayland.enable"; - description = '' + description = lib.mdDoc '' Whether to decompress fonts in - /run/current-system/sw/share/X11/fonts. + {file}`/run/current-system/sw/share/X11/fonts`. ''; }; diff --git a/nixos/modules/config/locale.nix b/nixos/modules/config/locale.nix index 6f0565881877..7716e121c712 100644 --- a/nixos/modules/config/locale.nix +++ b/nixos/modules/config/locale.nix @@ -22,9 +22,8 @@ in default = null; type = timezone; example = "America/New_York"; - description = '' - The time zone used when displaying times and dates. See + description = lib.mdDoc '' + The time zone used when displaying times and dates. See for a comprehensive list of possible values for this setting. If null, the timezone will default to UTC and can be set imperatively @@ -35,7 +34,7 @@ in hardwareClockInLocalTime = mkOption { default = false; type = types.bool; - description = "If set, keep the hardware clock in local time instead of UTC."; + description = lib.mdDoc "If set, keep the hardware clock in local time instead of UTC."; }; }; @@ -44,18 +43,18 @@ in latitude = mkOption { type = types.float; - description = '' + description = lib.mdDoc '' Your current latitude, between - -90.0 and 90.0. Must be provided + `-90.0` and `90.0`. Must be provided along with longitude. ''; }; longitude = mkOption { type = types.float; - description = '' + description = lib.mdDoc '' Your current longitude, between - between -180.0 and 180.0. Must be + between `-180.0` and `180.0`. Must be provided along with latitude. ''; }; @@ -63,9 +62,9 @@ in provider = mkOption { type = types.enum [ "manual" "geoclue2" ]; default = "manual"; - description = '' + description = lib.mdDoc '' The location provider to use for determining your location. If set to - manual you must also provide latitude/longitude. + `manual` you must also provide latitude/longitude. ''; }; diff --git a/nixos/modules/config/nsswitch.nix b/nixos/modules/config/nsswitch.nix index e494ff5f74d5..b004072813bd 100644 --- a/nixos/modules/config/nsswitch.nix +++ b/nixos/modules/config/nsswitch.nix @@ -13,10 +13,10 @@ with lib; type = types.listOf types.path; internal = true; default = []; - description = '' + description = lib.mdDoc '' Search path for NSS (Name Service Switch) modules. This allows several DNS resolution methods to be specified via - /etc/nsswitch.conf. + {file}`/etc/nsswitch.conf`. ''; apply = list: { @@ -28,8 +28,8 @@ with lib; system.nssDatabases = { passwd = mkOption { type = types.listOf types.str; - description = '' - List of passwd entries to configure in /etc/nsswitch.conf. + description = lib.mdDoc '' + List of passwd entries to configure in {file}`/etc/nsswitch.conf`. Note that "files" is always prepended while "systemd" is appended if nscd is enabled. @@ -40,8 +40,8 @@ with lib; group = mkOption { type = types.listOf types.str; - description = '' - List of group entries to configure in /etc/nsswitch.conf. + description = lib.mdDoc '' + List of group entries to configure in {file}`/etc/nsswitch.conf`. Note that "files" is always prepended while "systemd" is appended if nscd is enabled. @@ -52,8 +52,8 @@ with lib; shadow = mkOption { type = types.listOf types.str; - description = '' - List of shadow entries to configure in /etc/nsswitch.conf. + description = lib.mdDoc '' + List of shadow entries to configure in {file}`/etc/nsswitch.conf`. Note that "files" is always prepended. @@ -64,8 +64,8 @@ with lib; hosts = mkOption { type = types.listOf types.str; - description = '' - List of hosts entries to configure in /etc/nsswitch.conf. + description = lib.mdDoc '' + List of hosts entries to configure in {file}`/etc/nsswitch.conf`. Note that "files" is always prepended, and "dns" and "myhostname" are always appended. @@ -76,8 +76,8 @@ with lib; services = mkOption { type = types.listOf types.str; - description = '' - List of services entries to configure in /etc/nsswitch.conf. + description = lib.mdDoc '' + List of services entries to configure in {file}`/etc/nsswitch.conf`. Note that "files" is always prepended. diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 01555d28b73f..aa3ca549f09a 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -89,7 +89,7 @@ in { enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable the PulseAudio sound server. ''; }; @@ -97,7 +97,7 @@ in { systemWide = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If false, a PulseAudio server is launched automatically for each user that tries to use the sound system. The server runs with user privileges. If true, one system-wide PulseAudio @@ -112,7 +112,7 @@ in { support32Bit = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to include the 32-bit pulseaudio libraries in the system or not. This is only useful on 64-bit systems and currently limited to x86_64-linux. ''; @@ -120,7 +120,7 @@ in { configFile = mkOption { type = types.nullOr types.path; - description = '' + description = lib.mdDoc '' The path to the default configuration options the PulseAudio server should use. By default, the "default.pa" configuration from the PulseAudio distribution is used. @@ -130,8 +130,8 @@ in { extraConfig = mkOption { type = types.lines; default = ""; - description = '' - Literal string to append to configFile + description = lib.mdDoc '' + Literal string to append to `configFile` and the config file generated by the pulseaudio module. ''; }; @@ -139,7 +139,7 @@ in { extraClientConf = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Extra configuration appended to pulse/client.conf file. ''; }; @@ -151,10 +151,10 @@ in { else pkgs.pulseaudio; defaultText = literalExpression "pkgs.pulseaudio"; example = literalExpression "pkgs.pulseaudioFull"; - description = '' + description = lib.mdDoc '' The PulseAudio derivation to use. This can be used to enable features (such as JACK support, Bluetooth) via the - pulseaudioFull package. + `pulseaudioFull` package. ''; }; @@ -162,7 +162,7 @@ in { type = types.listOf types.package; default = []; example = literalExpression "[ pkgs.pulseaudio-modules-bt ]"; - description = '' + description = lib.mdDoc '' Extra pulseaudio modules to use. This is intended for out-of-tree pulseaudio modules like extra bluetooth codecs. @@ -174,7 +174,7 @@ in { logLevel = mkOption { type = types.str; default = "notice"; - description = '' + description = lib.mdDoc '' The log level that the system-wide pulseaudio daemon should use, if activated. ''; @@ -183,7 +183,7 @@ in { config = mkOption { type = types.attrsOf types.unspecified; default = {}; - description = "Config of the pulse daemon. See man pulse-daemon.conf."; + description = lib.mdDoc "Config of the pulse daemon. See `man pulse-daemon.conf`."; example = literalExpression ''{ realtime-scheduling = "yes"; }''; }; }; @@ -205,7 +205,7 @@ in { type = types.listOf types.str; default = []; example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]''; - description = '' + description = lib.mdDoc '' A list of IP subnets that are allowed to stream to the server. ''; }; diff --git a/nixos/modules/config/unix-odbc-drivers.nix b/nixos/modules/config/unix-odbc-drivers.nix index 055c3b2364e6..7bd3fa1600b0 100644 --- a/nixos/modules/config/unix-odbc-drivers.nix +++ b/nixos/modules/config/unix-odbc-drivers.nix @@ -20,10 +20,10 @@ in { type = types.listOf types.package; default = []; example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]"; - description = '' + description = lib.mdDoc '' Specifies Unix ODBC drivers to be registered in - /etc/odbcinst.ini. You may also want to - add pkgs.unixODBC to the system path to get + {file}`/etc/odbcinst.ini`. You may also want to + add `pkgs.unixODBC` to the system path to get a command line client to connect to ODBC databases. ''; }; diff --git a/nixos/modules/config/xdg/autostart.nix b/nixos/modules/config/xdg/autostart.nix index 40984cb5ec53..a4fdbda911a2 100644 --- a/nixos/modules/config/xdg/autostart.nix +++ b/nixos/modules/config/xdg/autostart.nix @@ -10,9 +10,9 @@ with lib; xdg.autostart.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install files to support the - XDG Autostart specification. + [XDG Autostart specification](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html). ''; }; }; diff --git a/nixos/modules/config/xdg/icons.nix b/nixos/modules/config/xdg/icons.nix index 1e91670cf03b..8d44a431445b 100644 --- a/nixos/modules/config/xdg/icons.nix +++ b/nixos/modules/config/xdg/icons.nix @@ -10,9 +10,9 @@ with lib; xdg.icons.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install files to support the - XDG Icon Theme specification. + [XDG Icon Theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html). ''; }; }; diff --git a/nixos/modules/config/xdg/menus.nix b/nixos/modules/config/xdg/menus.nix index 6735a7a5c430..b8f829e81547 100644 --- a/nixos/modules/config/xdg/menus.nix +++ b/nixos/modules/config/xdg/menus.nix @@ -10,9 +10,9 @@ with lib; xdg.menus.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install files to support the - XDG Desktop Menu specification. + [XDG Desktop Menu specification](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html). ''; }; }; diff --git a/nixos/modules/config/xdg/sounds.nix b/nixos/modules/config/xdg/sounds.nix index 0b94f550929b..713d68131fc0 100644 --- a/nixos/modules/config/xdg/sounds.nix +++ b/nixos/modules/config/xdg/sounds.nix @@ -10,9 +10,9 @@ with lib; xdg.sounds.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to install files to support the - XDG Sound Theme specification. + [XDG Sound Theme specification](https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/). ''; }; }; From 4dd84a34db0eb06189d44264e8cad2bf7faed6e5 Mon Sep 17 00:00:00 2001 From: pennae Date: Tue, 19 Jul 2022 15:05:45 +0200 Subject: [PATCH 08/55] nixos/hardware: invariant option docs MD conversions --- nixos/modules/hardware/cpu/intel-sgx.nix | 14 +++++++------- nixos/modules/hardware/ksm.nix | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nixos/modules/hardware/cpu/intel-sgx.nix b/nixos/modules/hardware/cpu/intel-sgx.nix index 1355ee753f0d..76664133a08f 100644 --- a/nixos/modules/hardware/cpu/intel-sgx.nix +++ b/nixos/modules/hardware/cpu/intel-sgx.nix @@ -6,13 +6,13 @@ let in { options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption { - description = '' + description = lib.mdDoc '' Whether to enable backward compatibility for SGX software build for the out-of-tree Intel SGX DCAP driver. - Creates symbolic links for the SGX devices /dev/sgx_enclave - and /dev/sgx_provision to make them available as - /dev/sgx/enclave and /dev/sgx/provision, + Creates symbolic links for the SGX devices `/dev/sgx_enclave` + and `/dev/sgx_provision` to make them available as + `/dev/sgx/enclave` and `/dev/sgx/provision`, respectively. ''; type = types.bool; @@ -22,17 +22,17 @@ in options.hardware.cpu.intel.sgx.provision = { enable = mkEnableOption "access to the Intel SGX provisioning device"; user = mkOption { - description = "Owner to assign to the SGX provisioning device."; + description = lib.mdDoc "Owner to assign to the SGX provisioning device."; type = types.str; default = "root"; }; group = mkOption { - description = "Group to assign to the SGX provisioning device."; + description = lib.mdDoc "Group to assign to the SGX provisioning device."; type = types.str; default = defaultPrvGroup; }; mode = mkOption { - description = "Mode to set for the SGX provisioning device."; + description = lib.mdDoc "Mode to set for the SGX provisioning device."; type = types.str; default = "0660"; }; diff --git a/nixos/modules/hardware/ksm.nix b/nixos/modules/hardware/ksm.nix index 829c3532c459..ba7a1c12169f 100644 --- a/nixos/modules/hardware/ksm.nix +++ b/nixos/modules/hardware/ksm.nix @@ -15,9 +15,9 @@ in { sleep = mkOption { type = types.nullOr types.int; default = null; - description = '' + description = lib.mdDoc '' How many milliseconds ksmd should sleep between scans. - Setting it to null uses the kernel's default time. + Setting it to `null` uses the kernel's default time. ''; }; }; From 77d56dfc22e454a8598d9a354f816b6393ef410f Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 09/55] nixos/i18n: invariant option docs MD conversions --- nixos/modules/i18n/input-method/fcitx.nix | 4 ++-- nixos/modules/i18n/input-method/ibus.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/i18n/input-method/fcitx.nix b/nixos/modules/i18n/input-method/fcitx.nix index 7738581b893a..043ec3d55c1f 100644 --- a/nixos/modules/i18n/input-method/fcitx.nix +++ b/nixos/modules/i18n/input-method/fcitx.nix @@ -22,9 +22,9 @@ in let enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines; engines = concatStringsSep ", " - (map (name: "${name}") (attrNames enginesDrv)); + (map (name: "`${name}`") (attrNames enginesDrv)); in - "Enabled Fcitx engines. Available engines are: ${engines}."; + lib.mdDoc "Enabled Fcitx engines. Available engines are: ${engines}."; }; }; diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix index 907f6451fce1..520db128acd9 100644 --- a/nixos/modules/i18n/input-method/ibus.nix +++ b/nixos/modules/i18n/input-method/ibus.nix @@ -43,15 +43,15 @@ in let enginesDrv = filterAttrs (const isDerivation) pkgs.ibus-engines; engines = concatStringsSep ", " - (map (name: "${name}") (attrNames enginesDrv)); + (map (name: "`${name}`") (attrNames enginesDrv)); in - "Enabled IBus engines. Available engines are: ${engines}."; + lib.mdDoc "Enabled IBus engines. Available engines are: ${engines}."; }; panel = mkOption { type = with types; nullOr path; default = null; example = literalExpression ''"''${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"''; - description = "Replace the IBus panel with another panel."; + description = lib.mdDoc "Replace the IBus panel with another panel."; }; }; }; From 4ba72f8615691ba85266a9a961b93189549c02a1 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 10/55] nixos/installer: invariant option docs MD conversions --- nixos/modules/installer/tools/tools.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 04be272742ce..481ccc4444f5 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -74,15 +74,15 @@ in configuration = mkOption { internal = true; type = types.str; - description = '' - The NixOS module that nixos-generate-config - saves to /etc/nixos/configuration.nix. + description = lib.mdDoc '' + The NixOS module that `nixos-generate-config` + saves to `/etc/nixos/configuration.nix`. This is an internal option. No backward compatibility is guaranteed. Use at your own risk! Note that this string gets spliced into a Perl script. The perl - variable $bootLoaderConfig can be used to + variable `$bootLoaderConfig` can be used to splice in the boot loader configuration. ''; }; @@ -91,15 +91,15 @@ in internal = true; type = types.listOf types.lines; default = []; - description = '' - Text to preseed the desktop configuration that nixos-generate-config - saves to /etc/nixos/configuration.nix. + description = lib.mdDoc '' + Text to preseed the desktop configuration that `nixos-generate-config` + saves to `/etc/nixos/configuration.nix`. This is an internal option. No backward compatibility is guaranteed. Use at your own risk! Note that this string gets spliced into a Perl script. The perl - variable $bootLoaderConfig can be used to + variable `$bootLoaderConfig` can be used to splice in the boot loader configuration. ''; }; @@ -109,7 +109,7 @@ in internal = true; type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Disable nixos-rebuild, nixos-generate-config, nixos-installer and other NixOS tools. This is useful to shrink embedded, read-only systems which are not expected to be rebuild or From 4f9183858429fba967a92519e6c63e3310a78ee5 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 11/55] nixos/misc: invariant option docs MD conversions --- nixos/modules/misc/man-db.nix | 4 ++-- nixos/modules/misc/mandoc.nix | 8 ++++---- nixos/modules/misc/version.nix | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nixos/modules/misc/man-db.nix b/nixos/modules/misc/man-db.nix index 7aeb02d883ac..d267ad125646 100644 --- a/nixos/modules/misc/man-db.nix +++ b/nixos/modules/misc/man-db.nix @@ -36,8 +36,8 @@ in type = lib.types.package; default = pkgs.man-db; defaultText = lib.literalExpression "pkgs.man-db"; - description = '' - The man-db derivation to use. Useful to override + description = lib.mdDoc '' + The `man-db` derivation to use. Useful to override configuration options used for the package. ''; }; diff --git a/nixos/modules/misc/mandoc.nix b/nixos/modules/misc/mandoc.nix index 838f20876563..d67c42bff6a0 100644 --- a/nixos/modules/misc/mandoc.nix +++ b/nixos/modules/misc/mandoc.nix @@ -16,9 +16,9 @@ in { type = with lib.types; listOf str; default = [ "share/man" ]; example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]"; - description = '' + description = lib.mdDoc '' Change the manpath, i. e. the directories where - man1 + {manpage}`man(1)` looks for section-specific directories of man pages. You only need to change this setting if you want extra man pages (e. g. in non-english languages). All values must be strings that @@ -31,8 +31,8 @@ in { type = lib.types.package; default = pkgs.mandoc; defaultText = lib.literalExpression "pkgs.mandoc"; - description = '' - The mandoc derivation to use. Useful to override + description = lib.mdDoc '' + The `mandoc` derivation to use. Useful to override configuration options used for the package. ''; }; diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index da458a574840..bdc3e5623be6 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -49,42 +49,42 @@ in nixos.version = mkOption { internal = true; type = types.str; - description = "The full NixOS version (e.g. 16.03.1160.f2d4ee1)."; + description = lib.mdDoc "The full NixOS version (e.g. `16.03.1160.f2d4ee1`)."; }; nixos.release = mkOption { readOnly = true; type = types.str; default = trivial.release; - description = "The NixOS release (e.g. 16.03)."; + description = lib.mdDoc "The NixOS release (e.g. `16.03`)."; }; nixos.versionSuffix = mkOption { internal = true; type = types.str; default = trivial.versionSuffix; - description = "The NixOS version suffix (e.g. 1160.f2d4ee1)."; + description = lib.mdDoc "The NixOS version suffix (e.g. `1160.f2d4ee1`)."; }; nixos.revision = mkOption { internal = true; type = types.nullOr types.str; default = trivial.revisionWithDefault null; - description = "The Git revision from which this NixOS configuration was built."; + description = lib.mdDoc "The Git revision from which this NixOS configuration was built."; }; nixos.codeName = mkOption { readOnly = true; type = types.str; default = trivial.codeName; - description = "The NixOS release code name (e.g. Emu)."; + description = lib.mdDoc "The NixOS release code name (e.g. `Emu`)."; }; stateVersion = mkOption { type = types.str; default = cfg.release; defaultText = literalExpression "config.${opt.release}"; - description = '' + description = lib.mdDoc '' Every once in a while, a new NixOS release may change configuration defaults in a way incompatible with stateful data. For instance, if the default version of PostgreSQL @@ -108,13 +108,13 @@ in internal = true; type = types.str; default = "https://nixos.org/channels/nixos-unstable"; - description = "Default NixOS channel to which the root user is subscribed."; + description = lib.mdDoc "Default NixOS channel to which the root user is subscribed."; }; configurationRevision = mkOption { type = types.nullOr types.str; default = null; - description = "The Git revision of the top-level flake from which this configuration was built."; + description = lib.mdDoc "The Git revision of the top-level flake from which this configuration was built."; }; }; From da37ca6760983e9c95f6e2945e31f7e78fb83da5 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 12/55] nixos/programs: invariant option docs MD conversions --- nixos/modules/programs/atop.nix | 20 +++++++-------- nixos/modules/programs/bash/bash.nix | 20 +++++++-------- nixos/modules/programs/dconf.nix | 4 +-- nixos/modules/programs/fish.nix | 30 +++++++++++------------ nixos/modules/programs/less.nix | 20 +++++++-------- nixos/modules/programs/nano.nix | 6 ++--- nixos/modules/programs/proxychains.nix | 34 +++++++++++++------------- nixos/modules/programs/spacefm.nix | 10 ++++---- nixos/modules/programs/starship.nix | 4 +-- 9 files changed, 74 insertions(+), 74 deletions(-) diff --git a/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix index a31078a891a0..a0763d2dcf6b 100644 --- a/nixos/modules/programs/atop.nix +++ b/nixos/modules/programs/atop.nix @@ -20,7 +20,7 @@ in type = types.package; default = pkgs.atop; defaultText = literalExpression "pkgs.atop"; - description = '' + description = lib.mdDoc '' Which package to use for Atop. ''; }; @@ -29,7 +29,7 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to install and enable the netatop kernel module. Note: this sets the kernel taint flag "O" for loading out-of-tree modules. ''; @@ -38,7 +38,7 @@ in type = types.package; default = config.boot.kernelPackages.netatop; defaultText = literalExpression "config.boot.kernelPackages.netatop"; - description = '' + description = lib.mdDoc '' Which package to use for netatop. ''; }; @@ -47,7 +47,7 @@ in atopgpu.enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to install and enable the atopgpud daemon to get information about NVIDIA gpus. ''; @@ -56,7 +56,7 @@ in setuidWrapper.enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to install a setuid wrapper for Atop. This is required to use some of the features as non-root user (e.g.: ipc information, netatop, atopgpu). Atop tries to drop the root privileges shortly after starting. @@ -66,7 +66,7 @@ in atopService.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to enable the atop service responsible for storing statistics for long-term analysis. ''; @@ -74,7 +74,7 @@ in atopRotateTimer.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to enable the atop-rotate timer, which restarts the atop service daily to make sure the data files are rotate. ''; @@ -82,7 +82,7 @@ in atopacctService.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to enable the atopacct service which manages process accounting. This allows Atop to gather data about processes that disappeared in between two refresh intervals. @@ -95,8 +95,8 @@ in flags = "a1f"; interval = 5; }; - description = '' - Parameters to be written to /etc/atoprc. + description = lib.mdDoc '' + Parameters to be written to {file}`/etc/atoprc`. ''; }; }; diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix index 7281126979e5..249e99ddc472 100644 --- a/nixos/modules/programs/bash/bash.nix +++ b/nixos/modules/programs/bash/bash.nix @@ -30,10 +30,10 @@ in /* enable = mkOption { default = true; - description = '' + description = lib.mdDoc '' Whenever to configure Bash as an interactive shell. Note that this tries to make Bash the default - , + {option}`users.defaultUserShell`, which in turn means that you might need to explicitly set this variable if you have another shell configured with NixOS. @@ -44,16 +44,16 @@ in shellAliases = mkOption { default = {}; - description = '' - Set of aliases for bash shell, which overrides . - See for an option format description. + description = lib.mdDoc '' + Set of aliases for bash shell, which overrides {option}`environment.shellAliases`. + See {option}`environment.shellAliases` for an option format description. ''; type = with types; attrsOf (nullOr (either str path)); }; shellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during bash shell initialisation. ''; type = types.lines; @@ -61,7 +61,7 @@ in loginShellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during login bash shell initialisation. ''; type = types.lines; @@ -69,7 +69,7 @@ in interactiveShellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during interactive bash shell initialisation. ''; type = types.lines; @@ -92,7 +92,7 @@ in fi fi ''; - description = '' + description = lib.mdDoc '' Shell script code used to initialise the bash prompt. ''; type = types.lines; @@ -100,7 +100,7 @@ in promptPluginInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code used to initialise bash prompt plugins. ''; type = types.lines; diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix index 265c41cbbbc9..b5ef42a3b72b 100644 --- a/nixos/modules/programs/dconf.nix +++ b/nixos/modules/programs/dconf.nix @@ -33,14 +33,14 @@ in profiles = mkOption { type = types.attrsOf types.path; default = {}; - description = "Set of dconf profile files, installed at /etc/dconf/profiles/name."; + description = lib.mdDoc "Set of dconf profile files, installed at {file}`/etc/dconf/profiles/«name»`."; internal = true; }; packages = mkOption { type = types.listOf types.package; default = []; - description = "A list of packages which provide dconf profiles and databases in /etc/dconf."; + description = lib.mdDoc "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`."; }; }; }; diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix index 8dd7101947fa..357105c3e79b 100644 --- a/nixos/modules/programs/fish.nix +++ b/nixos/modules/programs/fish.nix @@ -49,7 +49,7 @@ in enable = mkOption { default = false; - description = '' + description = lib.mdDoc '' Whether to configure fish as an interactive shell. ''; type = types.bool; @@ -58,16 +58,16 @@ in useBabelfish = mkOption { type = types.bool; default = false; - description = '' - If enabled, the configured environment will be translated to native fish using babelfish. - Otherwise, foreign-env will be used. + description = lib.mdDoc '' + If enabled, the configured environment will be translated to native fish using [babelfish](https://github.com/bouk/babelfish). + Otherwise, [foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) will be used. ''; }; vendor.config.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether fish should source configuration snippets provided by other packages. ''; }; @@ -75,7 +75,7 @@ in vendor.completions.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether fish should use completion files provided by other packages. ''; }; @@ -83,7 +83,7 @@ in vendor.functions.enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether fish should autoload fish functions provided by other packages. ''; }; @@ -94,7 +94,7 @@ in gco = "git checkout"; npu = "nix-prefetch-url"; }; - description = '' + description = lib.mdDoc '' Set of fish abbreviations. ''; type = with types; attrsOf str; @@ -102,16 +102,16 @@ in shellAliases = mkOption { default = {}; - description = '' - Set of aliases for fish shell, which overrides . - See for an option format description. + description = lib.mdDoc '' + Set of aliases for fish shell, which overrides {option}`environment.shellAliases`. + See {option}`environment.shellAliases` for an option format description. ''; type = with types; attrsOf (nullOr (either str path)); }; shellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during fish shell initialisation. ''; type = types.lines; @@ -119,7 +119,7 @@ in loginShellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during fish login shell initialisation. ''; type = types.lines; @@ -127,7 +127,7 @@ in interactiveShellInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code called during interactive fish shell initialisation. ''; type = types.lines; @@ -135,7 +135,7 @@ in promptInit = mkOption { default = ""; - description = '' + description = lib.mdDoc '' Shell script code used to initialise fish prompt. ''; type = types.lines; diff --git a/nixos/modules/programs/less.nix b/nixos/modules/programs/less.nix index 794146b19faf..9f2d5d915815 100644 --- a/nixos/modules/programs/less.nix +++ b/nixos/modules/programs/less.nix @@ -41,12 +41,12 @@ in type = types.nullOr types.path; default = null; example = literalExpression ''"''${pkgs.my-configs}/lesskey"''; - description = '' + description = lib.mdDoc '' Path to lesskey configuration file. - takes precedence over , - , , and - . + {option}`configFile` takes precedence over {option}`commands`, + {option}`clearDefaultCommands`, {option}`lineEditingKeys`, and + {option}`envVariables`. ''; }; @@ -57,13 +57,13 @@ in h = "noaction 5\\e("; l = "noaction 5\\e)"; }; - description = "Defines new command keys."; + description = lib.mdDoc "Defines new command keys."; }; clearDefaultCommands = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Clear all default commands. You should remember to set the quit key. Otherwise you will not be able to leave less without killing it. @@ -76,7 +76,7 @@ in example = { e = "abort"; }; - description = "Defines new line-editing keys."; + description = lib.mdDoc "Defines new line-editing keys."; }; envVariables = mkOption { @@ -87,14 +87,14 @@ in example = { LESS = "--quit-if-one-screen"; }; - description = "Defines environment variables."; + description = lib.mdDoc "Defines environment variables."; }; lessopen = mkOption { type = types.nullOr types.str; default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s"; defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"''; - description = '' + description = lib.mdDoc '' Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed. ''; }; @@ -102,7 +102,7 @@ in lessclose = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' When less closes a file opened in such a way, it will call another program, called the input postprocessor, which may perform any desired clean-up action (such as deleting the replacement file created by LESSOPEN). ''; }; diff --git a/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix index 5837dd46d7cd..16bab620d6e2 100644 --- a/nixos/modules/programs/nano.nix +++ b/nixos/modules/programs/nano.nix @@ -14,9 +14,9 @@ in nanorc = lib.mkOption { type = lib.types.lines; default = ""; - description = '' + description = lib.mdDoc '' The system-wide nano configuration. - See nanorc5. + See {manpage}`nanorc(5)`. ''; example = '' set nowrap @@ -27,7 +27,7 @@ in syntaxHighlight = lib.mkOption { type = lib.types.bool; default = true; - description = "Whether to enable syntax highlight for various languages."; + description = lib.mdDoc "Whether to enable syntax highlight for various languages."; }; }; }; diff --git a/nixos/modules/programs/proxychains.nix b/nixos/modules/programs/proxychains.nix index 3f44e23a93ef..5d932b2d8423 100644 --- a/nixos/modules/programs/proxychains.nix +++ b/nixos/modules/programs/proxychains.nix @@ -26,17 +26,17 @@ let type = mkOption { type = types.enum [ "http" "socks4" "socks5" ]; - description = "Proxy type."; + description = lib.mdDoc "Proxy type."; }; host = mkOption { type = types.str; - description = "Proxy host or IP address."; + description = lib.mdDoc "Proxy host or IP address."; }; port = mkOption { type = types.port; - description = "Proxy port"; + description = lib.mdDoc "Proxy port"; }; }; }; @@ -55,26 +55,26 @@ in { type = mkOption { type = types.enum [ "dynamic" "strict" "random" ]; default = "strict"; - description = '' - dynamic - Each connection will be done via chained proxies + description = lib.mdDoc '' + `dynamic` - Each connection will be done via chained proxies all proxies chained in the order as they appear in the list at least one proxy must be online to play in chain (dead proxies are skipped) - otherwise EINTR is returned to the app. + otherwise `EINTR` is returned to the app. - strict - Each connection will be done via chained proxies + `strict` - Each connection will be done via chained proxies all proxies chained in the order as they appear in the list all proxies must be online to play in chain - otherwise EINTR is returned to the app. + otherwise `EINTR` is returned to the app. - random - Each connection will be done via random proxy - (or proxy chain, see ) from the list. + `random` - Each connection will be done via random proxy + (or proxy chain, see {option}`programs.proxychains.chain.length`) from the list. ''; }; length = mkOption { type = types.nullOr types.int; default = null; - description = '' + description = lib.mdDoc '' Chain length for random chain. ''; }; @@ -83,7 +83,7 @@ in { proxyDNS = mkOption { type = types.bool; default = true; - description = "Proxy DNS requests - no leak for DNS data."; + description = lib.mdDoc "Proxy DNS requests - no leak for DNS data."; }; quietMode = mkEnableOption "Quiet mode (no output from the library)."; @@ -91,7 +91,7 @@ in { remoteDNSSubnet = mkOption { type = types.enum [ 10 127 224 ]; default = 224; - description = '' + description = lib.mdDoc '' Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default. ''; }; @@ -99,24 +99,24 @@ in { tcpReadTimeOut = mkOption { type = types.int; default = 15000; - description = "Connection read time-out in milliseconds."; + description = lib.mdDoc "Connection read time-out in milliseconds."; }; tcpConnectTimeOut = mkOption { type = types.int; default = 8000; - description = "Connection time-out in milliseconds."; + description = lib.mdDoc "Connection time-out in milliseconds."; }; localnet = mkOption { type = types.str; default = "127.0.0.0/255.0.0.0"; - description = "By default enable localnet for loopback address ranges."; + description = lib.mdDoc "By default enable localnet for loopback address ranges."; }; proxies = mkOption { type = types.attrsOf (types.submodule proxyOptions); - description = '' + description = lib.mdDoc '' Proxies to be used by proxychains. ''; diff --git a/nixos/modules/programs/spacefm.nix b/nixos/modules/programs/spacefm.nix index f71abcaa3325..b4ba9dcdea56 100644 --- a/nixos/modules/programs/spacefm.nix +++ b/nixos/modules/programs/spacefm.nix @@ -17,8 +17,8 @@ in enable = mkOption { type = types.bool; default = false; - description = '' - Whether to install SpaceFM and create /etc/spacefm/spacefm.conf. + description = lib.mdDoc '' + Whether to install SpaceFM and create {file}`/etc/spacefm/spacefm.conf`. ''; }; @@ -34,10 +34,10 @@ in terminal_su = "''${pkgs.sudo}/bin/sudo"; } ''; - description = '' + description = lib.mdDoc '' The system-wide spacefm configuration. - Parameters to be written to /etc/spacefm/spacefm.conf. - Refer to the relevant entry in the SpaceFM manual. + Parameters to be written to {file}`/etc/spacefm/spacefm.conf`. + Refer to the [relevant entry](https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc) in the SpaceFM manual. ''; }; diff --git a/nixos/modules/programs/starship.nix b/nixos/modules/programs/starship.nix index 83d2272003c6..ade80b9999e1 100644 --- a/nixos/modules/programs/starship.nix +++ b/nixos/modules/programs/starship.nix @@ -16,8 +16,8 @@ in { settings = mkOption { inherit (settingsFormat) type; default = { }; - description = '' - Configuration included in starship.toml. + description = lib.mdDoc '' + Configuration included in `starship.toml`. See https://starship.rs/config/#prompt for documentation. ''; From cbc44d68a75eb0273cd676728ef7989c70307c6b Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 13/55] nixos/security: invariant option docs MD conversions --- nixos/modules/security/lock-kernel-modules.nix | 4 ++-- nixos/modules/security/polkit.nix | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/security/lock-kernel-modules.nix b/nixos/modules/security/lock-kernel-modules.nix index 065587bc286e..674ba857818c 100644 --- a/nixos/modules/security/lock-kernel-modules.nix +++ b/nixos/modules/security/lock-kernel-modules.nix @@ -11,11 +11,11 @@ with lib; security.lockKernelModules = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Disable kernel module loading once the system is fully initialised. Module loading is disabled until the next reboot. Problems caused by delayed module loading can be fixed by adding the module(s) in - question to . + question to {option}`boot.kernelModules`. ''; }; }; diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index 1ba149745c65..0a2d81445ba5 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -29,7 +29,7 @@ in if (subject.local) return "yes"; }); ''; - description = + description = lib.mdDoc '' Any polkit rules to be added to config (in JavaScript ;-). See: http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-rules @@ -40,12 +40,12 @@ in type = types.listOf types.str; default = [ "unix-group:wheel" ]; example = [ "unix-user:alice" "unix-group:admin" ]; - description = + description = lib.mdDoc '' Specifies which users are considered “administrators”, for those actions that require the user to authenticate as an - administrator (i.e. have an auth_admin - value). By default, this is all users in the wheel group. + administrator (i.e. have an `auth_admin` + value). By default, this is all users in the `wheel` group. ''; }; From 860a0449cebd29682c87960af319ec6a2336b1e2 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 20 Jul 2022 12:32:04 +0200 Subject: [PATCH 14/55] nixos/system: invariant option docs MD conversions --- .../generations-dir/generations-dir.nix | 10 +-- nixos/modules/system/boot/systemd.nix | 70 +++++++++---------- nixos/modules/system/boot/systemd/initrd.nix | 40 +++++------ nixos/modules/system/boot/tmp.nix | 10 +-- nixos/modules/system/etc/etc.nix | 30 ++++---- 5 files changed, 80 insertions(+), 80 deletions(-) diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix index 1437ab387700..5ace5dd06fd4 100644 --- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix +++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix @@ -22,11 +22,11 @@ in enable = mkOption { default = false; type = types.bool; - description = '' + description = lib.mdDoc '' Whether to create symlinks to the system generations under - /boot. When enabled, - /boot/default/kernel, - /boot/default/initrd, etc., are updated to + `/boot`. When enabled, + `/boot/default/kernel`, + `/boot/default/initrd`, etc., are updated to point to the current generation's kernel image, initial RAM disk, and other bootstrap files. @@ -41,7 +41,7 @@ in copyKernels = mkOption { default = false; type = types.bool; - description = '' + description = lib.mdDoc '' Whether copy the necessary boot files into /boot, so /nix/store is not needed by the boot loader. ''; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 645fbc2b713a..c7b62871eb4e 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -177,11 +177,11 @@ in default = pkgs.systemd; defaultText = literalExpression "pkgs.systemd"; type = types.package; - description = "The systemd package."; + description = lib.mdDoc "The systemd package."; }; systemd.units = mkOption { - description = "Definition of systemd units."; + description = lib.mdDoc "Definition of systemd units."; default = {}; type = systemdUtils.types.units; }; @@ -190,43 +190,43 @@ in default = []; type = types.listOf types.package; example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; - description = "Packages providing systemd units and hooks."; + description = lib.mdDoc "Packages providing systemd units and hooks."; }; systemd.targets = mkOption { default = {}; type = systemdUtils.types.targets; - description = "Definition of systemd target units."; + description = lib.mdDoc "Definition of systemd target units."; }; systemd.services = mkOption { default = {}; type = systemdUtils.types.services; - description = "Definition of systemd service units."; + description = lib.mdDoc "Definition of systemd service units."; }; systemd.sockets = mkOption { default = {}; type = systemdUtils.types.sockets; - description = "Definition of systemd socket units."; + description = lib.mdDoc "Definition of systemd socket units."; }; systemd.timers = mkOption { default = {}; type = systemdUtils.types.timers; - description = "Definition of systemd timer units."; + description = lib.mdDoc "Definition of systemd timer units."; }; systemd.paths = mkOption { default = {}; type = systemdUtils.types.paths; - description = "Definition of systemd path units."; + description = lib.mdDoc "Definition of systemd path units."; }; systemd.mounts = mkOption { default = []; type = systemdUtils.types.mounts; - description = '' + description = lib.mdDoc '' Definition of systemd mount units. This is a list instead of an attrSet, because systemd mandates the names to be derived from the 'where' attribute. @@ -236,7 +236,7 @@ in systemd.automounts = mkOption { default = []; type = systemdUtils.types.automounts; - description = '' + description = lib.mdDoc '' Definition of systemd automount units. This is a list instead of an attrSet, because systemd mandates the names to be derived from the 'where' attribute. @@ -246,41 +246,41 @@ in systemd.slices = mkOption { default = {}; type = systemdUtils.types.slices; - description = "Definition of slice configurations."; + description = lib.mdDoc "Definition of slice configurations."; }; systemd.generators = mkOption { type = types.attrsOf types.path; default = {}; example = { systemd-gpt-auto-generator = "/dev/null"; }; - description = '' + description = lib.mdDoc '' Definition of systemd generators. - For each NAME = VALUE pair of the attrSet, a link is generated from - /etc/systemd/system-generators/NAME to VALUE. + For each `NAME = VALUE` pair of the attrSet, a link is generated from + `/etc/systemd/system-generators/NAME` to `VALUE`. ''; }; systemd.shutdown = mkOption { type = types.attrsOf types.path; default = {}; - description = '' + description = lib.mdDoc '' Definition of systemd shutdown executables. - For each NAME = VALUE pair of the attrSet, a link is generated from - /etc/systemd/system-shutdown/NAME to VALUE. + For each `NAME = VALUE` pair of the attrSet, a link is generated from + `/etc/systemd/system-shutdown/NAME` to `VALUE`. ''; }; systemd.defaultUnit = mkOption { default = "multi-user.target"; type = types.str; - description = "Default unit started when the system boots."; + description = lib.mdDoc "Default unit started when the system boots."; }; systemd.ctrlAltDelUnit = mkOption { default = "reboot.target"; type = types.str; example = "poweroff.target"; - description = '' + description = lib.mdDoc '' Target that should be started when Ctrl-Alt-Delete is pressed. ''; }; @@ -289,8 +289,8 @@ in type = with types; attrsOf (nullOr (oneOf [ str path package ])); default = {}; example = { TZ = "CET"; }; - description = '' - Environment variables passed to all systemd units. + description = lib.mdDoc '' + Environment variables passed to *all* systemd units. ''; }; @@ -298,16 +298,16 @@ in type = with types; attrsOf (nullOr (oneOf [ str path package ])); default = {}; example = { SYSTEMD_LOG_LEVEL = "debug"; }; - description = '' + description = lib.mdDoc '' Environment variables of PID 1. These variables are - not passed to started units. + *not* passed to started units. ''; }; systemd.enableCgroupAccounting = mkOption { default = true; type = types.bool; - description = '' + description = lib.mdDoc '' Whether to enable cgroup accounting. ''; }; @@ -315,7 +315,7 @@ in systemd.enableUnifiedCgroupHierarchy = mkOption { default = true; type = types.bool; - description = '' + description = lib.mdDoc '' Whether to enable the unified cgroup hierarchy (cgroupsv2). ''; }; @@ -324,7 +324,7 @@ in default = ""; type = types.lines; example = "DefaultLimitCORE=infinity"; - description = '' + description = lib.mdDoc '' Extra config options for systemd. See man systemd-system.conf for available options. ''; @@ -334,7 +334,7 @@ in default = ""; type = types.lines; example = "HibernateDelaySec=1h"; - description = '' + description = lib.mdDoc '' Extra config options for systemd sleep state logic. See sleep.conf.d(5) man page for available options. ''; @@ -344,7 +344,7 @@ in default = [ ]; type = types.listOf types.str; example = [ "debug-shell.service" "systemd-quotacheck.service" ]; - description = '' + description = lib.mdDoc '' Additional units shipped with systemd that shall be enabled. ''; }; @@ -353,10 +353,10 @@ in default = [ ]; type = types.listOf types.str; example = [ "systemd-backlight@.service" ]; - description = '' + description = lib.mdDoc '' A list of units to skip when generating system systemd configuration directory. This has - priority over upstream units, , and - . The main purpose of this is to + priority over upstream units, {option}`systemd.units`, and + {option}`systemd.additionalUpstreamSystemUnits`. The main purpose of this is to prevent a upstream systemd unit from being added to the initrd with any modifications made to it by other NixOS modules. ''; @@ -366,7 +366,7 @@ in type = types.nullOr types.path; default = null; example = "/dev/watchdog"; - description = '' + description = lib.mdDoc '' The path to a hardware watchdog device which will be managed by systemd. If not specified, systemd will default to /dev/watchdog. ''; @@ -376,7 +376,7 @@ in type = types.nullOr types.str; default = null; example = "30s"; - description = '' + description = lib.mdDoc '' The amount of time which can elapse before a watchdog hardware device will automatically reboot the system. Valid time units include "ms", "s", "min", "h", "d", and "w". @@ -387,7 +387,7 @@ in type = types.nullOr types.str; default = null; example = "10m"; - description = '' + description = lib.mdDoc '' The amount of time which can elapse after a reboot has been triggered before a watchdog hardware device will automatically reboot the system. Valid time units include "ms", "s", "min", "h", "d", and "w". @@ -398,7 +398,7 @@ in type = types.nullOr types.str; default = null; example = "10m"; - description = '' + description = lib.mdDoc '' The amount of time which can elapse when kexec is being executed before a watchdog hardware device will automatically reboot the system. This option should only be enabled if reloadTime is also enabled. Valid diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index cdec7f532917..9ba07c8d204e 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -150,7 +150,7 @@ in { }; contents = mkOption { - description = "Set of files that have to be linked into the initrd"; + description = lib.mdDoc "Set of files that have to be linked into the initrd"; example = literalExpression '' { "/etc/hostname".text = "mymachine"; @@ -162,7 +162,7 @@ in { }; storePaths = mkOption { - description = '' + description = lib.mdDoc '' Store paths to copy into the initrd as well. ''; type = with types; listOf (oneOf [ singleLineStr package ]); @@ -170,7 +170,7 @@ in { }; extraBin = mkOption { - description = '' + description = lib.mdDoc '' Tools to add to /bin ''; example = literalExpression '' @@ -183,7 +183,7 @@ in { }; suppressedStorePaths = mkOption { - description = '' + description = lib.mdDoc '' Store paths specified in the storePaths option that should not be copied. ''; @@ -194,7 +194,7 @@ in { emergencyAccess = mkOption { type = with types; oneOf [ bool singleLineStr ]; visible = false; - description = '' + description = lib.mdDoc '' Set to true for unauthenticated emergency access, and false for no emergency access. @@ -208,7 +208,7 @@ in { type = types.listOf types.package; default = []; visible = false; - description = '' + description = lib.mdDoc '' Packages to include in /bin for the stage 1 emergency shell. ''; }; @@ -218,7 +218,7 @@ in { type = types.listOf types.str; visible = false; example = [ "debug-shell.service" "systemd-quotacheck.service" ]; - description = '' + description = lib.mdDoc '' Additional units shipped with systemd that shall be enabled. ''; }; @@ -228,17 +228,17 @@ in { type = types.listOf types.str; example = [ "systemd-backlight@.service" ]; visible = false; - description = '' + description = lib.mdDoc '' A list of units to skip when generating system systemd configuration directory. This has - priority over upstream units, , and - . The main purpose of this is to + priority over upstream units, {option}`boot.initrd.systemd.units`, and + {option}`boot.initrd.systemd.additionalUpstreamUnits`. The main purpose of this is to prevent a upstream systemd unit from being added to the initrd with any modifications made to it by other NixOS modules. ''; }; units = mkOption { - description = "Definition of systemd units."; + description = lib.mdDoc "Definition of systemd units."; default = {}; visible = false; type = systemdUtils.types.units; @@ -249,49 +249,49 @@ in { visible = false; type = types.listOf types.package; example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; - description = "Packages providing systemd units and hooks."; + description = lib.mdDoc "Packages providing systemd units and hooks."; }; targets = mkOption { default = {}; visible = false; type = systemdUtils.types.initrdTargets; - description = "Definition of systemd target units."; + description = lib.mdDoc "Definition of systemd target units."; }; services = mkOption { default = {}; type = systemdUtils.types.initrdServices; visible = false; - description = "Definition of systemd service units."; + description = lib.mdDoc "Definition of systemd service units."; }; sockets = mkOption { default = {}; type = systemdUtils.types.initrdSockets; visible = false; - description = "Definition of systemd socket units."; + description = lib.mdDoc "Definition of systemd socket units."; }; timers = mkOption { default = {}; type = systemdUtils.types.initrdTimers; visible = false; - description = "Definition of systemd timer units."; + description = lib.mdDoc "Definition of systemd timer units."; }; paths = mkOption { default = {}; type = systemdUtils.types.initrdPaths; visible = false; - description = "Definition of systemd path units."; + description = lib.mdDoc "Definition of systemd path units."; }; mounts = mkOption { default = []; type = systemdUtils.types.initrdMounts; visible = false; - description = '' + description = lib.mdDoc '' Definition of systemd mount units. This is a list instead of an attrSet, because systemd mandates the names to be derived from the 'where' attribute. @@ -302,7 +302,7 @@ in { default = []; type = systemdUtils.types.automounts; visible = false; - description = '' + description = lib.mdDoc '' Definition of systemd automount units. This is a list instead of an attrSet, because systemd mandates the names to be derived from the 'where' attribute. @@ -313,7 +313,7 @@ in { default = {}; type = systemdUtils.types.slices; visible = false; - description = "Definition of slice configurations."; + description = lib.mdDoc "Definition of slice configurations."; }; }; diff --git a/nixos/modules/system/boot/tmp.nix b/nixos/modules/system/boot/tmp.nix index cf6d19eb5f0e..1f9431710aec 100644 --- a/nixos/modules/system/boot/tmp.nix +++ b/nixos/modules/system/boot/tmp.nix @@ -14,23 +14,23 @@ in boot.cleanTmpDir = mkOption { type = types.bool; default = false; - description = '' - Whether to delete all files in /tmp during boot. + description = lib.mdDoc '' + Whether to delete all files in {file}`/tmp` during boot. ''; }; boot.tmpOnTmpfs = mkOption { type = types.bool; default = false; - description = '' - Whether to mount a tmpfs on /tmp during boot. + description = lib.mdDoc '' + Whether to mount a tmpfs on {file}`/tmp` during boot. ''; }; boot.tmpOnTmpfsSize = mkOption { type = types.oneOf [ types.str types.types.ints.positive ]; default = "50%"; - description = '' + description = lib.mdDoc '' Size of tmpfs in percentage. Percentage is defined by systemd. ''; diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix index ed552fecec53..cfb9c39458ea 100644 --- a/nixos/modules/system/etc/etc.nix +++ b/nixos/modules/system/etc/etc.nix @@ -82,8 +82,8 @@ in "default/useradd".text = "GROUP=100 ..."; } ''; - description = '' - Set of files that have to be linked in /etc. + description = lib.mdDoc '' + Set of files that have to be linked in {file}`/etc`. ''; type = with types; attrsOf (submodule ( @@ -93,7 +93,7 @@ in enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether this /etc file should be generated. This option allows specific /etc files to be disabled. ''; @@ -101,9 +101,9 @@ in target = mkOption { type = types.str; - description = '' + description = lib.mdDoc '' Name of symlink (relative to - /etc). Defaults to the attribute + {file}`/etc`). Defaults to the attribute name. ''; }; @@ -111,20 +111,20 @@ in text = mkOption { default = null; type = types.nullOr types.lines; - description = "Text of the file."; + description = lib.mdDoc "Text of the file."; }; source = mkOption { type = types.path; - description = "Path of the source file."; + description = lib.mdDoc "Path of the source file."; }; mode = mkOption { type = types.str; default = "symlink"; example = "0600"; - description = '' - If set to something else than symlink, + description = lib.mdDoc '' + If set to something else than `symlink`, the file is copied instead of symlinked, with the given file mode. ''; @@ -133,7 +133,7 @@ in uid = mkOption { default = 0; type = types.int; - description = '' + description = lib.mdDoc '' UID of created file. Only takes effect when the file is copied (that is, the mode is not 'symlink'). ''; @@ -142,7 +142,7 @@ in gid = mkOption { default = 0; type = types.int; - description = '' + description = lib.mdDoc '' GID of created file. Only takes effect when the file is copied (that is, the mode is not 'symlink'). ''; @@ -151,20 +151,20 @@ in user = mkOption { default = "+${toString config.uid}"; type = types.str; - description = '' + description = lib.mdDoc '' User name of created file. Only takes effect when the file is copied (that is, the mode is not 'symlink'). - Changing this option takes precedence over uid. + Changing this option takes precedence over `uid`. ''; }; group = mkOption { default = "+${toString config.gid}"; type = types.str; - description = '' + description = lib.mdDoc '' Group name of created file. Only takes effect when the file is copied (that is, the mode is not 'symlink'). - Changing this option takes precedence over gid. + Changing this option takes precedence over `gid`. ''; }; From b115622f4bbf9f1af8f7c94a85a6bd17e8c8d10e Mon Sep 17 00:00:00 2001 From: pennae Date: Tue, 19 Jul 2022 15:05:45 +0200 Subject: [PATCH 15/55] nixos/tasks: invariant option docs MD conversions --- nixos/modules/tasks/encrypted-devices.nix | 14 ++++++------- nixos/modules/tasks/snapraid.nix | 24 +++++++++++------------ nixos/modules/tasks/swraid.nix | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/nixos/modules/tasks/encrypted-devices.nix b/nixos/modules/tasks/encrypted-devices.nix index 06117d19af46..7837a34b4984 100644 --- a/nixos/modules/tasks/encrypted-devices.nix +++ b/nixos/modules/tasks/encrypted-devices.nix @@ -16,33 +16,33 @@ let enable = mkOption { default = false; type = types.bool; - description = "The block device is backed by an encrypted one, adds this device as a initrd luks entry."; + description = lib.mdDoc "The block device is backed by an encrypted one, adds this device as a initrd luks entry."; }; blkDev = mkOption { default = null; example = "/dev/sda1"; type = types.nullOr types.str; - description = "Location of the backing encrypted device."; + description = lib.mdDoc "Location of the backing encrypted device."; }; label = mkOption { default = null; example = "rootfs"; type = types.nullOr types.str; - description = "Label of the unlocked encrypted device. Set fileSystems.<name?>.device to /dev/mapper/<label> to mount the unlocked device."; + description = lib.mdDoc "Label of the unlocked encrypted device. Set `fileSystems..device` to `/dev/mapper/