treewide: manually convert some docs to Markdown

These files all have options that trip up the `nix-doc-munge`
conversion tool for one reason or another (syntax that clashes with
Markdown, options that were already using Markdown syntax despite not
being marked that way, output that differs slightly after conversion,
syntax too elaborate to convert with some cheap regular expressions,
...). Translate them manually and do a little copyediting to options
in the vicinity while we're at it.
This commit is contained in:
Emily 2023-06-30 23:35:51 +01:00
parent e2a1cb50d8
commit 3228f92b90
17 changed files with 242 additions and 213 deletions

View file

@ -664,25 +664,25 @@ with lib;
(types.enum [ "Background" "Standard" "Adaptive" "Interactive" ]); (types.enum [ "Background" "Standard" "Adaptive" "Interactive" ]);
default = null; default = null;
example = "Background"; example = "Background";
description = '' description = lib.mdDoc ''
This optional key describes, at a high level, the intended purpose of the job. The system will apply This optional key describes, at a high level, the intended purpose of the job. The system will apply
resource limits based on what kind of job it is. If left unspecified, the system will apply light resource limits based on what kind of job it is. If left unspecified, the system will apply light
resource limits to the job, throttling its CPU usage and I/O bandwidth. The following are valid values: resource limits to the job, throttling its CPU usage and I/O bandwidth. The following are valid values:
Background Background
Background jobs are generally processes that do work that was not directly requested by the user. : Background jobs are generally processes that do work that was not directly requested by the user.
The resource limits applied to Background jobs are intended to prevent them from disrupting the The resource limits applied to Background jobs are intended to prevent them from disrupting the
user experience. user experience.
Standard Standard
Standard jobs are equivalent to no ProcessType being set. : Standard jobs are equivalent to no ProcessType being set.
Adaptive Adaptive
Adaptive jobs move between the Background and Interactive classifications based on activity over : Adaptive jobs move between the Background and Interactive classifications based on activity over
XPC connections. See <literal>xpc_transaction_begin(3)</literal> for details. XPC connections. See {manpage}`xpc_transaction_begin(3)` for details.
Interactive Interactive
Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive : Interactive jobs run with the same resource limitations as apps, that is to say, none. Interactive
jobs are critical to maintaining a responsive user experience, and this key should only be jobs are critical to maintaining a responsive user experience, and this key should only be
used if an app's ability to be responsive depends on it, and cannot be made Adaptive. used if an app's ability to be responsive depends on it, and cannot be made Adaptive.
''; '';

View file

@ -196,17 +196,11 @@ in {
system-features = [ "big-parallel" "kvm" "recursive-nix" ]; system-features = [ "big-parallel" "kvm" "recursive-nix" ];
} }
''; '';
description = '' description = lib.mdDoc ''
Configuration for Nix, see Configuration for Nix; see {manpage}`nix.conf(5)` for available options.
<link xlink:href="https://nixos.org/manual/nix/stable/#sec-conf-file"/> or
<citerefentry>
<refentrytitle>nix.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry> for available options.
The value declared here will be translated directly to the key-value pairs Nix expects. The value declared here will be translated directly to the key-value pairs Nix expects.
</para>
<para> Configuration specified in [](#opt-nix.extraOptions) will be appended
Configuration specified in <option>nix.extraOptions</option> which will be appended
verbatim to the resulting config file. verbatim to the resulting config file.
''; '';
}; };

View file

@ -34,41 +34,39 @@ with lib;
}; };
}); });
default = { }; default = { };
description = '' description = lib.mdDoc ''
A set of named specialized configurations. These can be used to extend A set of named specialized configurations. These can be used to extend
your base configuration with additional settings. For example, you can your base configuration with additional settings. For example, you can
have specialisations named <quote>light</quote> and <quote>dark</quote> have specialisations named "light" and "dark"
that applies light and dark color theme configurations. that apply light and dark color theme configurations.
</para><para> ::: {.note}
This is an experimental option for now and you therefore have to
Note, this is an experimental option for now and you therefore have to
activate the specialisation by looking up and running the activation activate the specialisation by looking up and running the activation
script yourself. Note, running the activation script will create a new script yourself. Running the activation script will create a new
Home Manager generation. Home Manager generation.
:::
</para><para> For example, to activate the "dark" specialisation, you can
For example, to activate the <quote>dark</quote> specialisation. You can
first look up your current Home Manager generation by running first look up your current Home Manager generation by running
<programlisting language="console"> ```console
$ home-manager generations | head -1 $ home-manager generations | head -1
2022-05-02 22:49 : id 1758 -> /nix/store/jyac-home-manager-generation 2022-05-02 22:49 : id 1758 -> /nix/store/jyac-home-manager-generation
</programlisting> ```
then run then run
<programlisting language="console"> ```console
$ /nix/store/jyac-home-manager-generation/specialisation/dark/activate $ /nix/store/jyac-home-manager-generation/specialisation/dark/activate
Starting Home Manager activation Starting Home Manager activation
</programlisting> ```
</para><para> ::: {.warning}
Since this option is experimental, the activation process may
WARNING! Since this option is experimental, the activation process may
change in backwards incompatible ways. change in backwards incompatible ways.
:::
''; '';
}; };

View file

@ -40,9 +40,10 @@ in {
default = { }; default = { };
example = literalExpression example = literalExpression
''{ Work = { source = "maildir://~/Maildir/work"; }; }''; ''{ Work = { source = "maildir://~/Maildir/work"; }; }'';
description = '' description = lib.mdDoc ''
Extra lines added to <filename>$HOME/.config/aerc/accounts.conf</filename>. Extra lines added to {file}`$HOME/.config/aerc/accounts.conf`.
See aerc-config(5).
See {manpage}`aerc-config(5)`.
''; '';
}; };
@ -50,10 +51,11 @@ in {
type = sectionsOrLines; type = sectionsOrLines;
default = { }; default = { };
example = literalExpression ''{ messages = { q = ":quit<Enter>"; }; }''; example = literalExpression ''{ messages = { q = ":quit<Enter>"; }; }'';
description = '' description = lib.mdDoc ''
Extra lines added to <filename>$HOME/.config/aerc/binds.conf</filename>. Extra lines added to {file}`$HOME/.config/aerc/binds.conf`.
Global keybindings can be set in the `global` section. Global keybindings can be set in the `global` section.
See aerc-config(5).
See {manpage}`aerc-config(5)`.
''; '';
}; };
@ -61,9 +63,10 @@ in {
type = sectionsOrLines; type = sectionsOrLines;
default = { }; default = { };
example = literalExpression ''{ ui = { sort = "-r date"; }; }''; example = literalExpression ''{ ui = { sort = "-r date"; }; }'';
description = '' description = lib.mdDoc ''
Extra lines added to <filename>$HOME/.config/aerc/aerc.conf</filename>. Extra lines added to {file}`$HOME/.config/aerc/aerc.conf`.
See aerc-config(5).
See {manpage}`aerc-config(5)`.
''; '';
}; };
@ -73,9 +76,10 @@ in {
example = literalExpression '' example = literalExpression ''
{ default = { ui = { "tab.selected.reverse" = toggle; }; }; }; { default = { ui = { "tab.selected.reverse" = toggle; }; }; };
''; '';
description = '' description = lib.mdDoc ''
Stylesets added to <filename>$HOME/.config/aerc/stylesets/</filename>. Stylesets added to {file}`$HOME/.config/aerc/stylesets/`.
See aerc-stylesets(7).
See {manpage}`aerc-stylesets(7)`.
''; '';
}; };
@ -85,9 +89,10 @@ in {
example = literalExpression '' example = literalExpression ''
{ new_message = "Hello!"; }; { new_message = "Hello!"; };
''; '';
description = '' description = lib.mdDoc ''
Templates added to <filename>$HOME/.config/aerc/templates/</filename>. Templates added to {file}`$HOME/.config/aerc/templates/`.
See aerc-templates(7).
See {manpage}`aerc-templates(7)`.
''; '';
}; };
}; };

View file

@ -89,10 +89,9 @@ in {
}; };
nix-direnv = { nix-direnv = {
enable = mkEnableOption '' enable = mkEnableOption (lib.mdDoc ''
<link [nix-direnv](https://github.com/nix-community/nix-direnv),
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>, a fast, persistent use_nix implementation for direnv'');
a fast, persistent use_nix implementation for direnv'';
}; };
}; };

View file

@ -442,20 +442,18 @@ in {
privacy-badger privacy-badger
] ]
''; '';
description = '' description = lib.mdDoc ''
List of Firefox add-on packages to install for this profile. List of Firefox add-on packages to install for this profile.
Some pre-packaged add-ons are accessible from NUR, Some pre-packaged add-ons are accessible from the
<link xlink:href="https://github.com/nix-community/NUR"/>. [Nix User Repository](https://github.com/nix-community/NUR).
Once you have NUR installed run Once you have NUR installed run
<screen language="console"> ```console
<prompt>$</prompt> <userinput>nix-env -f '&lt;nixpkgs&gt;' -qaP -A nur.repos.rycee.firefox-addons</userinput> $ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
</screen> ```
to list the available Firefox add-ons. to list the available Firefox add-ons.
</para><para>
Note that it is necessary to manually enable these extensions Note that it is necessary to manually enable these extensions
inside Firefox after the first installation. inside Firefox after the first installation.
''; '';

View file

@ -218,18 +218,18 @@ in {
backend = lib.mkOption { backend = lib.mkOption {
type = with lib.types; nullOr str; type = with lib.types; nullOr str;
default = null; default = null;
description = '' description = lib.mdDoc ''
Specifying 'accounts.email.accounts.*.himalaya.backend' is deprecated, Specifying {option}`accounts.email.accounts.*.himalaya.backend` is deprecated,
set 'accounts.email.accounts.*.himalaya.settings.backend' instead. set {option}`accounts.email.accounts.*.himalaya.settings.backend` instead.
''; '';
}; };
# TODO: remove me for the next release # TODO: remove me for the next release
sender = lib.mkOption { sender = lib.mkOption {
type = with lib.types; nullOr str; type = with lib.types; nullOr str;
description = '' description = lib.mdDoc ''
Specifying 'accounts.email.accounts.*.himalaya.sender' is deprecated, Specifying {option}`accounts.email.accounts.*.himalaya.sender` is deprecated,
set 'accounts.email.accounts.*.himalaya.settings.sender' instead. set {option}'accounts.email.accounts.*.himalaya.settings.sender' instead.
''; '';
}; };

View file

@ -38,10 +38,11 @@ in {
}; };
colors = mkOption { colors = mkOption {
description = '' description = lib.mdDoc ''
The colors used in colored JSON output.</para> The colors used in colored JSON output.
<para>See <link xlink:href="https://stedolan.github.io/jq/manual/#Colors"/>. See the [Colors section](https://jqlang.github.io/jq/manual/#Colors)
of the jq manual.
''; '';
example = literalExpression '' example = literalExpression ''

View file

@ -33,116 +33,123 @@ let
(toKeyValueIfDefined (getAttrs [ "type" "color" "priority" ] value.khal)) (toKeyValueIfDefined (getAttrs [ "type" "color" "priority" ] value.khal))
] ++ [ "\n" ]); ] ++ [ "\n" ]);
localeFormatOptions = let T = lib.types; localeFormatOptions = let
in mapAttrs (n: v: T = lib.types;
v // { suffix = ''
description = v.description + '' Format strings are for Python `strftime`, similarly to
{manpage}`strftime(3)`.
Format strings are for python 'strftime', similarly to man 3 strftime.
''; '';
}) { in {
dateformat = { dateformat = mkOption {
type = T.str; type = T.str;
default = "%x"; default = "%x";
description = '' description = lib.mdDoc ''
khal will display and understand all dates in this format. khal will display and understand all dates in this format.
${suffix}
''; '';
}; };
timeformat = { timeformat = mkOption {
type = T.str; type = T.str;
default = "%X"; default = "%X";
description = '' description = lib.mdDoc ''
khal will display and understand all times in this format. khal will display and understand all times in this format.
${suffix}
''; '';
}; };
datetimeformat = { datetimeformat = mkOption {
type = T.str; type = T.str;
default = "%c"; default = "%c";
description = '' description = lib.mdDoc ''
khal will display and understand all datetimes in this format. khal will display and understand all datetimes in this format.
${suffix}
''; '';
}; };
longdateformat = { longdateformat = mkOption {
type = T.str; type = T.str;
default = "%x"; default = "%x";
description = '' description = lib.mdDoc ''
khal will display and understand all dates in this format. khal will display and understand all dates in this format.
It should contain a year (e.g. %Y). It should contain a year (e.g. `%Y`).
${suffix}
''; '';
}; };
longdatetimeformat = { longdatetimeformat = mkOption {
type = T.str; type = T.str;
default = "%c"; default = "%c";
description = '' description = lib.mdDoc ''
khal will display and understand all datetimes in this format. khal will display and understand all datetimes in this format.
It should contain a year (e.g. %Y). It should contain a year (e.g. `%Y`).
${suffix}
''; '';
}; };
}; };
localeOptions = let T = lib.types; localeOptions = let T = lib.types;
in localeFormatOptions // { in localeFormatOptions // {
unicode_symbols = { unicode_symbols = mkOption {
type = T.bool; type = T.bool;
default = true; default = true;
description = '' description = lib.mdDoc ''
By default khal uses some unicode symbols (as in non-ascii) as By default khal uses some Unicode symbols (as in "non-ASCII") as
indicators for things like repeating events. indicators for things like repeating events.
If your font, encoding etc. does not support those symbols, set this If your font, encoding etc. does not support those symbols, set this
to false (this will enable ascii based replacements). to false (this will enable ASCII-based replacements).
''; '';
}; };
default_timezone = { default_timezone = mkOption {
type = T.nullOr T.str; type = T.nullOr T.str;
default = null; default = null;
description = '' description = lib.mdDoc ''
Default for new events or if khal does not understand the timezone Default for new events or if khal does not understand the timezone
in an ical file. in an ical file.
If 'null', the timezone of your computer will be used. If `null`, the timezone of your computer will be used.
''; '';
}; };
local_timezone = { local_timezone = mkOption {
type = T.nullOr T.str; type = T.nullOr T.str;
default = null; default = null;
description = '' description = lib.mdDoc ''
khal will show all times in this timezone. khal will show all times in this timezone.
If 'null', the timezone of your computer will be used. If `null`, the timezone of your computer will be used.
''; '';
}; };
firstweekday = { firstweekday = mkOption {
type = T.ints.between 0 6; type = T.ints.between 0 6;
default = 0; default = 0;
description = '' description = lib.mdDoc ''
the first day of the week, where Monday is 0 and Sunday is 6 The first day of the week, where Monday is 0 and Sunday is 6.
''; '';
}; };
weeknumbers = { weeknumbers = mkOption {
type = T.enum [ "off" "left" "right" ]; type = T.enum [ "off" "left" "right" ];
default = "off"; default = "off";
description = '' description = lib.mdDoc ''
Enable week numbers in calendar and interactive (ikhal) mode. Enable week numbers in calendar and interactive (ikhal) mode.
As those are iso weeknumbers, they only work properly if firstweekday As those are ISO week numbers, they only work properly if
is set to 0. {option}`firstweekday` is set to 0.
''; '';
}; };
}; };
in { in {
options.programs.khal = { options.programs.khal = {
enable = mkEnableOption "khal, a CLI calendar application"; enable = mkEnableOption (lib.mdDoc "khal, a CLI calendar application");
locale = mkOption { locale = mkOption {
type = lib.types.submodule { type = lib.types.submodule { options = localeOptions; };
options = mapAttrs (n: v: mkOption v) localeOptions; description = lib.mdDoc ''
};
description = ''
khal locale settings. khal locale settings.
''; '';
}; };

View file

@ -48,11 +48,14 @@ in {
apply = toString; apply = toString;
default = "${config.xdg.dataHome}/pyenv"; default = "${config.xdg.dataHome}/pyenv";
defaultText = "\${config.xdg.dataHome}/pyenv"; defaultText = "\${config.xdg.dataHome}/pyenv";
description = '' description = lib.mdDoc ''
The pyenv root directory (PYENV_ROOT). The pyenv root directory ({env}`PYENV_ROOT`).
</para><para>
Note: Deviating from upstream which uses `$HOME/.pyenv`, ::: {.note}
the default path is set according to the XDG base directory specification. This deviates from upstream, which uses {file}`$HOME/.pyenv`.
The default path in Home Manager is set according to the XDG
base directory specification.
:::
''; '';
}; };
}; };

View file

@ -118,8 +118,8 @@ in {
shading = mkOption { shading = mkOption {
type = types.ints.between 0 200; type = types.ints.between 0 200;
default = 100; default = 100;
description = description = lib.mdDoc
"Darken (0 .. 99) or lighten (101 .. 200) the transparent background."; "Darken (0 to 99) or lighten (101 to 200) the transparent background.";
}; };
extraConfig = mkOption { extraConfig = mkOption {

View file

@ -182,12 +182,11 @@ in {
type = types.str; type = types.str;
default = "${config.xdg.dataHome}/vdirsyncer/status"; default = "${config.xdg.dataHome}/vdirsyncer/status";
defaultText = "$XDG_DATA_HOME/vdirsyncer/status"; defaultText = "$XDG_DATA_HOME/vdirsyncer/status";
description = '' description = lib.mdDoc ''
A directory where vdirsyncer will store some additional data for the next sync. A directory where vdirsyncer will store some additional data for the next sync.
</para>
<para>For more information, see For more information, see the
<link xlink:href="https://vdirsyncer.pimutils.org/en/stable/config.html#general-section"/> [vdirsyncer manual](https://vdirsyncer.pimutils.org/en/stable/config.html#general-section).
''; '';
}; };
}; };

View file

@ -35,12 +35,15 @@ in {
type = types.path; type = types.path;
default = defaultHieNixExe; default = defaultHieNixExe;
defaultText = defaultHieNixExeText; defaultText = defaultHieNixExeText;
description = '' description = lib.mdDoc ''
The path to the Haskell IDE Engine executable. The path to the Haskell IDE Engine executable.
</para><para>
Because hie-nix is not packaged in Nixpkgs, you need to add it as an Because hie-nix is not packaged in Nixpkgs, you need to add it as an
overlay or set this option. Example overlay configuration: overlay or set this option. Example overlay configuration:
<programlisting language="nix">${exampleOverlay}</programlisting>
```nix
${exampleOverlay}
```
''; '';
example = literalExpression '' example = literalExpression ''
(import ~/src/haskell-ide-engine {}).hies + "/bin/hie-wrapper"; (import ~/src/haskell-ide-engine {}).hies + "/bin/hie-wrapper";

View file

@ -248,8 +248,8 @@ in
cdpath = mkOption { cdpath = mkOption {
default = []; default = [];
description = '' description = lib.mdDoc ''
List of paths to autocomplete calls to `cd`. List of paths to autocomplete calls to {command}`cd`.
''; '';
type = types.listOf types.str; type = types.listOf types.str;
}; };

View file

@ -26,14 +26,16 @@ let
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = true; default = true;
example = false; example = false;
description = "Color output (auto set to 'no' on dumb terminals)"; description = lib.mdDoc ''
Color output (automatically set to `false` on dumb terminals).
'';
}; };
pmoduleDirs = mkOption { pmoduleDirs = mkOption {
type = types.listOf types.path; type = types.listOf types.path;
default = [ ]; default = [ ];
example = [ "$HOME/.zprezto-contrib" ]; example = [ "$HOME/.zprezto-contrib" ];
description = "Add additional directories to load prezto modules from"; description = "Add additional directories to load prezto modules from.";
}; };
extraConfig = mkOption { extraConfig = mkOption {
@ -48,14 +50,18 @@ let
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "attr" "stat" ]; example = [ "attr" "stat" ];
description = "Set the Zsh modules to load (man zshmodules)."; description = lib.mdDoc ''
Set the Zsh modules to load ({manpage}`zshmodules(1)`).
'';
}; };
extraFunctions = mkOption { extraFunctions = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "zargs" "zmv" ]; example = [ "zargs" "zmv" ];
description = "Set the Zsh functions to load (man zshcontrib)."; description = lib.mdDoc ''
Set the Zsh functions to load ({manpage}`zshcontrib(1)`).
'';
}; };
pmodules = mkOption { pmodules = mkOption {
@ -86,8 +92,10 @@ let
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ ];
example = [ "0.0.0.0" "127.0.0.1" ]; example = [ "0.0.0.0" "127.0.0.1" ];
description = description = lib.mdDoc ''
"Set the entries to ignore in static */etc/hosts* for host completion."; Set the entries to ignore in static {file}`/etc/hosts` for
host completion.
'';
}; };
editor = { editor = {
@ -95,21 +103,25 @@ let
type = types.nullOr (types.enum [ "emacs" "vi" ]); type = types.nullOr (types.enum [ "emacs" "vi" ]);
default = "emacs"; default = "emacs";
example = "vi"; example = "vi";
description = "Set the key mapping style to 'emacs' or 'vi'."; description = lib.mdDoc ''
Set the key mapping style to `emacs` or `vi`.
'';
}; };
dotExpansion = mkOption { dotExpansion = mkOption {
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = null; default = null;
example = true; example = true;
description = "Auto convert .... to ../.."; description = lib.mdDoc ''
Automatically convert `....` to `../..`
'';
}; };
promptContext = mkOption { promptContext = mkOption {
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = null; default = null;
example = true; example = true;
description = "Allow the zsh prompt context to be shown."; description = "Allow the Zsh prompt context to be shown.";
}; };
}; };
@ -117,8 +129,10 @@ let
type = types.nullOr (types.enum [ "dirty" "untracked" "all" "none" ]); type = types.nullOr (types.enum [ "dirty" "untracked" "all" "none" ]);
default = null; default = null;
example = "all"; example = "all";
description = description = lib.mdDoc ''
"Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'."; Ignore submodules when they are `dirty`, `untracked`, `all`,
or `none`.
'';
}; };
gnuUtility.prefix = mkOption { gnuUtility.prefix = mkOption {
@ -154,8 +168,10 @@ let
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "manpages"; example = "manpages";
description = description = lib.mdDoc ''
"Set the keyword used by `mand` to open man pages in Dash.app"; Set the keyword used by {command}`mand` to open man pages
in Dash.app.
'';
}; };
prompt = { prompt = {
@ -163,19 +179,23 @@ let
type = types.nullOr types.str; type = types.nullOr types.str;
default = "sorin"; default = "sorin";
example = "pure"; example = "pure";
description = '' description = lib.mdDoc ''
Set the prompt theme to load. Setting it to 'random' Set the prompt theme to load. Setting it to `random`
loads a random theme. Auto set to 'off' on dumb terminals.''; loads a random theme. Automatically set to `off` on dumb
terminals.
'';
}; };
pwdLength = mkOption { pwdLength = mkOption {
type = types.nullOr (types.enum [ "short" "long" "full" ]); type = types.nullOr (types.enum [ "short" "long" "full" ]);
default = null; default = null;
example = "short"; example = "short";
description = '' description = lib.mdDoc ''
Set the working directory prompt display length. By Set the working directory prompt display length. By
default, it is set to 'short'. Set it to 'long' (without '~' expansion) for default, it is set to `short`. Set it to `long` (without `~`
longer or 'full' (with '~' expansion) for even longer prompt display.''; expansion) for longer or `full` (with `~` expansion) for
even longer prompt display.
'';
}; };
showReturnVal = mkOption { showReturnVal = mkOption {
@ -184,7 +204,8 @@ let
example = true; example = true;
description = '' description = ''
Set the prompt to display the return code along with an Set the prompt to display the return code along with an
indicator for non-zero return codes. This is not supported by all prompts.''; indicator for non-zero return codes. This is not supported by all prompts.
'';
}; };
}; };
@ -244,7 +265,8 @@ let
example = [ "main" "brackets" "pattern" "line" "cursor" "root" ]; example = [ "main" "brackets" "pattern" "line" "cursor" "root" ];
description = '' description = ''
Set syntax highlighters. By default, only the main Set syntax highlighters. By default, only the main
highlighter is enabled.''; highlighter is enabled.
'';
}; };
styles = mkOption { styles = mkOption {
@ -332,10 +354,12 @@ let
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = null; default = null;
example = true; example = true;
description = '' description = lib.mdDoc ''
Enabled safe options. This aliases cp, ln, mv and rm so Enabled safe options. This aliases {command}`cp`,
that they prompt before deleting or overwriting files. Set to 'no' to disable {command}`ln`, {command}`mv` and {command}`rm` so that they
this safer behavior.''; prompt before deleting or overwriting files. Set to `no` to
disable this safer behavior.
'';
}; };
}; };
}; };

View file

@ -122,38 +122,38 @@ in {
type = with types; type = with types;
let ty = oneOf [ bool int float str (listOf ty) (attrsOf ty) ]; let ty = oneOf [ bool int float str (listOf ty) (attrsOf ty) ];
in attrsOf (attrsOf ty // { description = "attribute sets"; }); in attrsOf (attrsOf ty // { description = "attribute sets"; });
description = '' description = lib.mdDoc ''
Polybar configuration. This takes a nix attrset and converts it to the Polybar configuration. This takes a nix attrset and converts it to the
strange data format that polybar uses. strange data format that polybar uses.
Each entry will be converted to a section in the output file. Each entry will be converted to a section in the output file.
Several things are treated specially: nested keys are converted Several things are treated specially: nested keys are converted
to dash-separated keys; the special <literal>text</literal> key is ignored as a nested key, to dash-separated keys; the special `text` key is ignored as a nested key,
to allow mixing different levels of nesting; and lists are converted to to allow mixing different levels of nesting; and lists are converted to
polybar's <literal>foo-0, foo-1, ...</literal> format. polybar's `foo-0, foo-1, ...` format.
</para><para>
For example: For example:
<programlisting language="nix"> ```nix
"module/volume" = { "module/volume" = {
type = "internal/pulseaudio"; type = "internal/pulseaudio";
format.volume = "&lt;ramp-volume&gt; &lt;label-volume&gt;"; format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇"; label.muted.text = "🔇";
label.muted.foreground = "#666"; label.muted.foreground = "#666";
ramp.volume = ["🔈" "🔉" "🔊"]; ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "pavucontrol &amp;"; click.right = "pavucontrol &";
} }
</programlisting> ```
becomes: becomes:
<programlisting language="ini"> ```ini
[module/volume] [module/volume]
type=internal/pulseaudio type=internal/pulseaudio
format-volume=&lt;ramp-volume&gt; &lt;label-volume&gt; format-volume=<ramp-volume> <label-volume>
label-muted=🔇 label-muted=🔇
label-muted-foreground=#666 label-muted-foreground=#666
ramp-volume-0=🔈 ramp-volume-0=🔈
ramp-volume-1=🔉 ramp-volume-1=🔉
ramp-volume-2=🔊 ramp-volume-2=🔊
click-right=pavucontrol &amp; click-right=pavucontrol &
</programlisting> ```
''; '';
default = { }; default = { };
example = literalExpression '' example = literalExpression ''

View file

@ -43,22 +43,20 @@ let
in { in {
options.home-manager = { options.home-manager = {
useUserPackages = mkEnableOption '' useUserPackages = mkEnableOption (mdDoc ''
installation of user packages through the installation of user packages through the
<option>users.users.&lt;name&gt;.packages</option> option {option}`users.users.<name>.packages` option'');
'';
useGlobalPkgs = mkEnableOption '' useGlobalPkgs = mkEnableOption (mdDoc ''
using the system configuration's <literal>pkgs</literal> using the system configuration's `pkgs`
argument in Home Manager. This disables the Home Manager argument in Home Manager. This disables the Home Manager
options <option>nixpkgs.*</option> options {option}`nixpkgs.*`'');
'';
backupFileExtension = mkOption { backupFileExtension = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "backup"; example = "backup";
description = '' description = mdDoc ''
On activation move existing files by appending the given On activation move existing files by appending the given
file extension rather than exiting with an error. file extension rather than exiting with an error.
''; '';
@ -68,8 +66,8 @@ in {
type = types.attrs; type = types.attrs;
default = { }; default = { };
example = literalExpression "{ inherit emacs-overlay; }"; example = literalExpression "{ inherit emacs-overlay; }";
description = '' description = mdDoc ''
Extra <literal>specialArgs</literal> passed to Home Manager. This Extra `specialArgs` passed to Home Manager. This
option can be used to pass additional arguments to all modules. option can be used to pass additional arguments to all modules.
''; '';
}; };
@ -78,7 +76,7 @@ in {
type = with types; listOf raw; type = with types; listOf raw;
default = [ ]; default = [ ];
example = literalExpression "[ { home.packages = [ nixpkgs-fmt ]; } ]"; example = literalExpression "[ { home.packages = [ nixpkgs-fmt ]; } ]";
description = '' description = mdDoc ''
Extra modules added to all users. Extra modules added to all users.
''; '';
}; };
@ -90,7 +88,7 @@ in {
default = { }; default = { };
# Prevent the entire submodule being included in the documentation. # Prevent the entire submodule being included in the documentation.
visible = "shallow"; visible = "shallow";
description = '' description = mdDoc ''
Per-user Home Manager configuration. Per-user Home Manager configuration.
''; '';
}; };