From ef176dcf7e76c3639571d7c6051246c8fbadf12a Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 28 Aug 2022 21:18:44 +0200 Subject: nixos/*: automatically convert option descriptions conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded. --- nixos/modules/system/boot/grow-partition.nix | 2 +- nixos/modules/system/boot/kernel.nix | 12 ++++++------ nixos/modules/system/boot/plymouth.nix | 2 +- nixos/modules/system/boot/stage-1.nix | 6 +++--- nixos/modules/system/boot/systemd/shutdown.nix | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'nixos/modules/system') diff --git a/nixos/modules/system/boot/grow-partition.nix b/nixos/modules/system/boot/grow-partition.nix index 87c981b24cec..034b2b9906f5 100644 --- a/nixos/modules/system/boot/grow-partition.nix +++ b/nixos/modules/system/boot/grow-partition.nix @@ -12,7 +12,7 @@ with lib; ]; options = { - boot.growPartition = mkEnableOption "grow the root partition on boot"; + boot.growPartition = mkEnableOption (lib.mdDoc "grow the root partition on boot"); }; config = mkIf config.boot.growPartition { diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 33e9eca62b07..0d2858462214 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -48,17 +48,17 @@ in # - some of it might not even evaluate correctly. defaultText = literalExpression "pkgs.linuxPackages"; example = literalExpression "pkgs.linuxKernel.packages.linux_5_10"; - description = '' + description = lib.mdDoc '' This option allows you to override the Linux kernel used by NixOS. Since things like external kernel module packages are tied to the kernel you're using, it also overrides those. This option is a function that takes Nixpkgs as an argument (as a convenience), and returns an attribute set containing at - the very least an attribute kernel. + the very least an attribute {var}`kernel`. Additional attributes may be needed depending on your configuration. For instance, if you use the NVIDIA X driver, then it also needs to contain an attribute - nvidia_x11. + {var}`nvidia_x11`. ''; }; @@ -73,9 +73,9 @@ in type = types.str; default = ""; example = "my secret seed"; - description = '' - Provides a custom seed for the RANDSTRUCT security - option of the Linux kernel. Note that RANDSTRUCT is + description = lib.mdDoc '' + Provides a custom seed for the {var}`RANDSTRUCT` security + option of the Linux kernel. Note that {var}`RANDSTRUCT` is only enabled in NixOS hardened kernels. Using a custom seed requires building the kernel and dependent packages locally, since this customization happens at build time. diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 6e20d7dc5e0f..9b6472fea429 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -62,7 +62,7 @@ in boot.plymouth = { - enable = mkEnableOption "Plymouth boot splash screen"; + enable = mkEnableOption (lib.mdDoc "Plymouth boot splash screen"); font = mkOption { default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index c24e6e27ee75..53d998c48a14 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -475,12 +475,12 @@ in type = types.str; default = ""; example = "/dev/sda3"; - description = '' + description = lib.mdDoc '' Device for manual resume attempt during boot. This should be used primarily if you want to resume from file. If left empty, the swap partitions are used. Specify here the device where the file resides. - You should also use boot.kernelParams to specify - «resume_offset». + You should also use {var}`boot.kernelParams` to specify + `«resume_offset»`. ''; }; diff --git a/nixos/modules/system/boot/systemd/shutdown.nix b/nixos/modules/system/boot/systemd/shutdown.nix index 5b190700c5d5..b4b750fa9aaf 100644 --- a/nixos/modules/system/boot/systemd/shutdown.nix +++ b/nixos/modules/system/boot/systemd/shutdown.nix @@ -9,7 +9,7 @@ in { options.systemd.shutdownRamfs = { - enable = lib.mkEnableOption "pivoting back to an initramfs for shutdown" // { default = true; }; + enable = lib.mkEnableOption (lib.mdDoc "pivoting back to an initramfs for shutdown") // { default = true; }; contents = lib.mkOption { description = lib.mdDoc "Set of files that have to be linked into the shutdown ramfs"; example = lib.literalExpression '' -- cgit 1.4.1