mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
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 <code> and <package>, so any option using such tags will not be converted at all.
This commit is contained in:
parent
52b0ad17e3
commit
2e751c0772
1050 changed files with 9605 additions and 9605 deletions
|
@ -33,27 +33,27 @@ let
|
|||
mountPoint = mkOption {
|
||||
example = "/mnt/usb";
|
||||
type = nonEmptyWithoutTrailingSlash;
|
||||
description = "Location of the mounted the file system.";
|
||||
description = lib.mdDoc "Location of the mounted the file system.";
|
||||
};
|
||||
|
||||
device = mkOption {
|
||||
default = null;
|
||||
example = "/dev/sda";
|
||||
type = types.nullOr nonEmptyStr;
|
||||
description = "Location of the device.";
|
||||
description = lib.mdDoc "Location of the device.";
|
||||
};
|
||||
|
||||
fsType = mkOption {
|
||||
default = "auto";
|
||||
example = "ext3";
|
||||
type = nonEmptyStr;
|
||||
description = "Type of the file system.";
|
||||
description = lib.mdDoc "Type of the file system.";
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
default = [ "defaults" ];
|
||||
example = [ "data=journal" ];
|
||||
description = "Options used to mount the file system.";
|
||||
description = lib.mdDoc "Options used to mount the file system.";
|
||||
type = types.listOf nonEmptyStr;
|
||||
};
|
||||
|
||||
|
@ -61,13 +61,13 @@ let
|
|||
default = [ ];
|
||||
example = [ "/persist" ];
|
||||
type = types.listOf nonEmptyWithoutTrailingSlash;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
List of paths that should be mounted before this one. This filesystem's
|
||||
<option>device</option> and <option>mountPoint</option> are always
|
||||
{option}`device` and {option}`mountPoint` are always
|
||||
checked and do not need to be included explicitly. If a path is added
|
||||
to this list, any other filesystem whose mount point is a parent of
|
||||
the path will be mounted before this filesystem. The paths do not need
|
||||
to actually be the <option>mountPoint</option> of some other filesystem.
|
||||
to actually be the {option}`mountPoint` of some other filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -88,25 +88,25 @@ let
|
|||
default = null;
|
||||
example = "root-partition";
|
||||
type = types.nullOr nonEmptyStr;
|
||||
description = "Label of the device (if any).";
|
||||
description = lib.mdDoc "Label of the device (if any).";
|
||||
};
|
||||
|
||||
autoFormat = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
If the device does not currently contain a filesystem (as
|
||||
determined by <command>blkid</command>, then automatically
|
||||
determined by {command}`blkid`, then automatically
|
||||
format it with the filesystem type specified in
|
||||
<option>fsType</option>. Use with caution.
|
||||
{option}`fsType`. Use with caution.
|
||||
'';
|
||||
};
|
||||
|
||||
formatOptions = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = ''
|
||||
If <option>autoFormat</option> option is set specifies
|
||||
description = lib.mdDoc ''
|
||||
If {option}`autoFormat` option is set specifies
|
||||
extra options passed to mkfs.
|
||||
'';
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ let
|
|||
autoResize = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
If set, the filesystem is grown to its maximum size before
|
||||
being mounted. (This is typically the size of the containing
|
||||
partition.) This is currently only supported for ext2/3/4
|
||||
|
@ -125,7 +125,7 @@ let
|
|||
noCheck = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "Disable running fsck on this filesystem.";
|
||||
description = lib.mdDoc "Disable running fsck on this filesystem.";
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -203,7 +203,7 @@ in
|
|||
default = [ ];
|
||||
example = [ "btrfs" ];
|
||||
type = types.listOf types.str;
|
||||
description = "Names of supported filesystem types.";
|
||||
description = lib.mdDoc "Names of supported filesystem types.";
|
||||
};
|
||||
|
||||
boot.specialFileSystems = mkOption {
|
||||
|
@ -219,7 +219,7 @@ in
|
|||
default = "5%";
|
||||
example = "32m";
|
||||
type = types.str;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Size limit for the /dev tmpfs. Look at mount(8), tmpfs size option,
|
||||
for the accepted syntax.
|
||||
'';
|
||||
|
@ -229,7 +229,7 @@ in
|
|||
default = "50%";
|
||||
example = "256m";
|
||||
type = types.str;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Size limit for the /dev/shm tmpfs. Look at mount(8), tmpfs size option,
|
||||
for the accepted syntax.
|
||||
'';
|
||||
|
@ -239,7 +239,7 @@ in
|
|||
default = "25%";
|
||||
example = "256m";
|
||||
type = types.str;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Size limit for the /run tmpfs. Look at mount(8), tmpfs size option,
|
||||
for the accepted syntax.
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue