1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

treewide: tweak DocBook docs for conversion

These help `nix-munge-doc` automate more of the Markdown conversion
process. See the following nixpkgs commits for explanations of many
of these changes:

* 275a34e0d8
* 694d5b19d3
* f1d39b6d61
* 16102dce2f

I couldn't think of any particularly good way to format the
`system.defaults` breadcrumbs, so I just made them standalone
paragraphs. They weren't rendering correctly in DocBook anyway.
This commit is contained in:
Emily 2023-06-22 02:34:49 +01:00
parent 76ce9faca6
commit b97c235e37
9 changed files with 87 additions and 72 deletions

View file

@ -31,9 +31,6 @@ let
# Option and submodule helper functions ----------------------------------------------------------
mkDocOptionLink = optionName:
''<link xlink:href="#opt-${optionName}"><option>${optionName}</option></link>'';
mkNullOrBoolOption = args: mkOption (args // {
type = types.nullOr types.bool;
default = null;
@ -104,7 +101,7 @@ let
Although auto-updating is disabled by default during system activation, note that Homebrew
will auto-update when you manually invoke certain Homebrew commands. To modify this
behavior see ${mkDocOptionLink "homebrew.global.autoUpdate"}.
behavior see <xref linkend="opt-homebrew.global.autoUpdate"/>.
'';
};
upgrade = mkOption {
@ -141,7 +138,7 @@ let
the Nix store, when you manually invoke <command>brew bundle</command>.
Enabling this option will change the default value of
${mkDocOptionLink "homebrew.global.lockfiles"} to <literal>false</literal> since, with
<xref linkend="opt-homebrew.global.lockfiles"/> to <literal>false</literal> since, with
this option enabled, <command>brew bundle [install]</command> will default to using the
Brewfile that this module generates in the Nix store, unless you explicitly point it at
another Brewfile using the <literal>--file</literal> flag. As a result, it will try to
@ -151,7 +148,7 @@ let
Implementation note: when enabled, this option sets the
<literal>HOMEBREW_BUNDLE_FILE</literal> environment variable to the path of the Brewfile
that this module generates in the Nix store, by adding it to
${mkDocOptionLink "environment.variables"}.
<xref linkend="opt-environment.variables"/>.
'';
};
autoUpdate = mkOption {
@ -166,14 +163,14 @@ let
above if it's been more then 5 minutes since it last updated.
You may want to consider disabling this option if you have
${mkDocOptionLink "homebrew.onActivation.upgrade"} enabled, and
${mkDocOptionLink "homebrew.onActivation.autoUpdate"} disabled, if you want to ensure that
<xref linkend="opt-homebrew.onActivation.upgrade"/> enabled, and
<xref linkend="opt-homebrew.onActivation.autoUpdate"/> disabled, if you want to ensure that
your installed formulae will only be upgraded during <command>nix-darwin</command> system
activation, after you've explicitly run <command>brew update</command>.
Implementation note: when disabled, this option sets the
<literal>HOMEBREW_NO_AUTO_UPDATE</literal> environment variable, by adding it to
${mkDocOptionLink "environment.variables"}.
<xref linkend="opt-environment.variables"/>.
'';
};
lockfiles = mkOption {
@ -185,7 +182,7 @@ let
<command>brew bundle [install]</command>.
This option will default to <literal>false</literal> if
${mkDocOptionLink "homebrew.global.brewfile"} is enabled since, with that option enabled,
<xref linkend="opt-homebrew.global.brewfile"/> is enabled since, with that option enabled,
<command>brew bundle [install]</command> will default to using the Brewfile that this
module generates in the Nix store, unless you explicitly point it at another Brewfile
using the <literal>--file</literal> flag. As a result, it will try to write the
@ -194,7 +191,7 @@ let
Implementation note: when disabled, this option sets the
<literal>HOMEBREW_BUNDLE_NO_LOCK</literal> environment variable, by adding it to
${mkDocOptionLink "environment.variables"}.
<xref linkend="opt-environment.variables"/>.
'';
};
@ -265,70 +262,70 @@ let
description = ''
Target location for Applications.
Homebrew's default is <filename class='directory'>/Applications</filename>.
Homebrew's default is <filename>/Applications</filename>.
'';
};
colorpickerdir = mkNullOrStrOption {
description = ''
Target location for Color Pickers.
Homebrew's default is <filename class='directory'>~/Library/ColorPickers</filename>.
Homebrew's default is <filename>~/Library/ColorPickers</filename>.
'';
};
prefpanedir = mkNullOrStrOption {
description = ''
Target location for Preference Panes.
Homebrew's default is <filename class='directory'>~/Library/PreferencePanes</filename>.
Homebrew's default is <filename>~/Library/PreferencePanes</filename>.
'';
};
qlplugindir = mkNullOrStrOption {
description = ''
Target location for QuickLook Plugins.
Homebrew's default is <filename class='directory'>~/Library/QuickLook</filename>.
Homebrew's default is <filename>~/Library/QuickLook</filename>.
'';
};
mdimporterdir = mkNullOrStrOption {
description = ''
Target location for Spotlight Plugins.
Homebrew's default is <filename class='directory'>~/Library/Spotlight</filename>.
Homebrew's default is <filename>~/Library/Spotlight</filename>.
'';
};
dictionarydir = mkNullOrStrOption {
description = ''
Target location for Dictionaries.
Homebrew's default is <filename class='directory'>~/Library/Dictionaries</filename>.
Homebrew's default is <filename>~/Library/Dictionaries</filename>.
'';
};
fontdir = mkNullOrStrOption {
description = ''
Target location for Fonts.
Homebrew's default is <filename class='directory'>~/Library/Fonts</filename>.
Homebrew's default is <filename>~/Library/Fonts</filename>.
'';
};
servicedir = mkNullOrStrOption {
description = ''
Target location for Services.
Homebrew's default is <filename class='directory'>~/Library/Services</filename>.
Homebrew's default is <filename>~/Library/Services</filename>.
'';
};
input_methoddir = mkNullOrStrOption {
description = ''
Target location for Input Methods.
Homebrew's default is <filename class='directory'>~/Library/Input Methods</filename>.
Homebrew's default is <filename>~/Library/Input Methods</filename>.
'';
};
internet_plugindir = mkNullOrStrOption {
description = ''
Target location for Internet Plugins.
Homebrew's default is <filename class='directory'>~/Library/Internet Plug-Ins</filename>.
Homebrew's default is <filename>~/Library/Internet Plug-Ins</filename>.
'';
};
audio_unit_plugindir = mkNullOrStrOption {
@ -336,28 +333,28 @@ let
Target location for Audio Unit Plugins.
Homebrew's default is
<filename class='directory'>~/Library/Audio/Plug-Ins/Components</filename>.
<filename>~/Library/Audio/Plug-Ins/Components</filename>.
'';
};
vst_plugindir = mkNullOrStrOption {
description = ''
Target location for VST Plugins.
Homebrew's default is <filename class='directory'>~/Library/Audio/Plug-Ins/VST</filename>.
Homebrew's default is <filename>~/Library/Audio/Plug-Ins/VST</filename>.
'';
};
vst3_plugindir = mkNullOrStrOption {
description = ''
Target location for VST3 Plugins.
Homebrew's default is <filename class='directory'>~/Library/Audio/Plug-Ins/VST3</filename>.
Homebrew's default is <filename>~/Library/Audio/Plug-Ins/VST3</filename>.
'';
};
screen_saverdir = mkNullOrStrOption {
description = ''
Target location for Screen Savers.
Homebrew's default is <filename class='directory'>~/Library/Screen Savers</filename>.
Homebrew's default is <filename>~/Library/Screen Savers</filename>.
'';
};
language = mkNullOrStrOption {
@ -481,7 +478,7 @@ let
visible = "shallow"; # so that options from `homebrew.caskArgs` aren't repeated.
description = ''
Arguments passed to <command>brew install --cask</command> when installing this cask. See
${mkDocOptionLink "homebrew.caskArgs"} for the available options.
<xref linkend="opt-homebrew.caskArgs"/> for the available options.
'';
};
greedy = mkNullOrBoolOption {
@ -523,12 +520,12 @@ in
Note that enabling this option does not install Homebrew, see the Homebrew
<link xlink:href="https://brew.sh">website</link> for installation instructions.
Use the ${mkDocOptionLink "homebrew.brews"}, ${mkDocOptionLink "homebrew.casks"},
${mkDocOptionLink "homebrew.masApps"}, and ${mkDocOptionLink "homebrew.whalebrews"} options
Use the <xref linkend="opt-homebrew.brews"/>, <xref linkend="opt-homebrew.casks"/>,
<xref linkend="opt-homebrew.masApps"/>, and <xref linkend="opt-homebrew.whalebrews"/> options
to list the Homebrew formulae, casks, Mac App Store apps, and Docker containers you'd like to
install. Use the ${mkDocOptionLink "homebrew.taps"} option, to make additional formula
install. Use the <xref linkend="opt-homebrew.taps"/> option, to make additional formula
repositories available to Homebrew. This module uses those options (along with the
${mkDocOptionLink "homebrew.caskArgs"} options) to generate a Brewfile that
<xref linkend="opt-homebrew.caskArgs"/> options) to generate a Brewfile that
<command>nix-darwin</command> passes to the <command>brew bundle</command> command during
system activation.
@ -536,10 +533,10 @@ in
and all formulae, as well as upgrading anything that's already installed, so that repeated
invocations of <command>darwin-rebuild switch</command> (without any change to the
configuration) are idempotent. You can modify this behavior using the options under
${mkDocOptionLink "homebrew.onActivation"}.
<xref linkend="opt-homebrew.onActivation"/>.
This module also provides a few options for modifying how Homebrew commands behave when
you manually invoke them, under ${mkDocOptionLink "homebrew.global"}
you manually invoke them, under <xref linkend="opt-homebrew.global"/>
'';
brewPrefix = mkOption {
@ -595,7 +592,7 @@ in
Taps defined as strings, e.g., <literal>"user/repo"</literal>, are a shorthand for:
<code>{ name = "user/repo"; }</code>
<literal>{ name = "user/repo"; }</literal>
'';
};
@ -610,7 +607,7 @@ in
'';
description = ''
Arguments passed to <command>brew install --cask</command> for all casks listed in
${mkDocOptionLink "homebrew.casks"}.
<xref linkend="opt-homebrew.casks"/>.
'';
};
@ -644,7 +641,7 @@ in
Formulae defined as strings, e.g., <literal>"imagemagick"</literal>, are a shorthand for:
<code>{ name = "imagemagick"; }</code>
<literal>{ name = "imagemagick"; }</literal>
'';
};
@ -675,7 +672,7 @@ in
Casks defined as strings, e.g., <literal>"google-chrome"</literal>, are a shorthand for:
<code>{ name = "google-chrome"; }</code>
<literal>{ name = "google-chrome"; }</literal>
'';
};
@ -692,12 +689,12 @@ in
Applications to install from Mac App Store using <command>mas</command>.
When this option is used, <literal>"mas"</literal> is automatically added to
${mkDocOptionLink "homebrew.brews"}.
<xref linkend="opt-homebrew.brews"/>.
Note that you need to be signed into the Mac App Store for <command>mas</command> to
successfully install and upgrade applications, and that unfortunately apps removed from this
option will not be uninstalled automatically even if
${mkDocOptionLink "homebrew.onActivation.cleanup"} is set to <literal>"uninstall"</literal>
<xref linkend="opt-homebrew.onActivation.cleanup"/> is set to <literal>"uninstall"</literal>
or <literal>"zap"</literal> (this is currently a limitation of Homebrew Bundle).
For more information on <command>mas</command> see:
@ -713,7 +710,7 @@ in
List of Docker images to install using <command>whalebrew</command>.
When this option is used, <literal>"whalebrew"</literal> is automatically added to
${mkDocOptionLink "homebrew.brews"}.
<xref linkend="opt-homebrew.brews"/>.
For more information on <command>whalebrew</command> see:
<link xlink:href="https://github.com/whalebrew/whalebrew">github.com/whalebrew/whalebrew</link>.

View file

@ -173,11 +173,11 @@ in
useDaemon = mkOption {
type = types.bool;
default = false;
description = "
description = ''
If set, Nix will use the daemon to perform operations.
Use this instead of services.nix-daemon.enable if you don't wan't the
daemon service to be managed for you.
";
'';
};
distributedBuilds = mkOption {
@ -594,7 +594,7 @@ in
then Nix will use a binary from a binary cache if and only
if it is signed by <emphasis>any</emphasis> of the keys
listed here. By default, only the key for
<uri>cache.nixos.org</uri> is included.
<literal>cache.nixos.org</literal> is included.
'';
};
@ -650,8 +650,7 @@ in
<link xlink:href="https://nixos.org/manual/nix/stable/#sec-conf-file"/>
for avalaible options.
The value declared here will be translated directly to the key-value pairs Nix expects.
</para>
<para>
Nix configurations defined under <option>nix.*</option> will be translated and applied to this
option. In addition, configuration specified in <option>nix.extraOptions</option> which will be appended
verbatim to the resulting config file.

View file

@ -88,7 +88,7 @@ in
via the Unix socket, and md5 password authentication will be
used for users connecting via TCP. Any added rules will be
inserted above the default rules. If you'd like to replace the
default rules entirely, you can use <function>lib.mkForce</function> in your
default rules entirely, you can use <literal>lib.mkForce</literal> in your
module.
'';
};
@ -159,7 +159,7 @@ in
For more information on how to specify the target
and on which privileges exist, see the
<link xlink:href="https://www.postgresql.org/docs/current/sql-grant.html">GRANT syntax</link>.
The attributes are used as <code>GRANT ''${attrValue} ON ''${attrName}</code>.
The attributes are used as <literal>GRANT ''${attrValue} ON ''${attrName}</literal>.
'';
example = literalExpression ''
{
@ -237,8 +237,8 @@ in
for an overview of <literal>postgresql.conf</literal>.
<note><para>
String values will automatically be enclosed in single quotes. Single quotes will be
escaped with two single quotes as described by the upstream documentation linked above.
String values will automatically be enclosed in single quotes. Single quotes will be
escaped with two single quotes as described by the upstream documentation linked above.
</para></note>
'';
example = literalExpression ''

View file

@ -23,9 +23,9 @@ in
enable = mkOption {
default = false;
type = types.bool;
description = "
description = ''
Whether to enable the Synergy client (receive keyboard and mouse events from a Synergy server).
";
'';
};
screenName = mkOption {
default = "";

View file

@ -229,7 +229,8 @@ in {
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Keyboard
Apple menu > System Preferences > Keyboard
If you press and hold certain keyboard keys when in a text area, the keys character begins to repeat.
For example, the Delete key continues to remove text for as long as you hold it down.
@ -241,7 +242,8 @@ in {
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Keyboard
Apple menu > System Preferences > Keyboard
If you press and hold certain keyboard keys when in a text area, the keys character begins to repeat.
For example, the Delete key continues to remove text for as long as you hold it down.
@ -285,7 +287,8 @@ in {
type = types.nullOr floatWithDeprecationError;
default = null;
description = ''
# Apple menu > System Preferences > Sound
Apple menu > System Preferences > Sound
Sets the beep/alert volume level from 0.000 (muted) to 1.000 (100% volume).
75% = 0.7788008
@ -300,7 +303,8 @@ in {
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Sound
Apple menu > System Preferences > Sound
Make a feedback sound when the system volume changed. This setting accepts
the integers 0 or 1. Defaults to 1.
'';

View file

@ -8,7 +8,8 @@ with lib;
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Security and Privacy > Firewall
Apple menu > System Preferences > Security and Privacy > Firewall
Enable the internal firewall to prevent unauthorised applications, programs
and services from accepting incoming connections.
@ -22,7 +23,8 @@ with lib;
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Security and Privacy > Firewall
Apple menu > System Preferences > Security and Privacy > Firewall
Allows any signed Application to accept incoming requests. Default is true.
0 = disabled
@ -34,7 +36,8 @@ with lib;
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Security and Privacy > Firewall
Apple menu > System Preferences > Security and Privacy > Firewall
Allows any downloaded Application that has been signed to accept incoming requests. Default is 0.
0 = disabled
@ -46,7 +49,8 @@ with lib;
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Security and Privacy > Firewall
Apple menu > System Preferences > Security and Privacy > Firewall
Enable logging of requests made to the firewall. Default is 0.
0 = disabled
@ -58,7 +62,8 @@ with lib;
type = types.nullOr types.int;
default = null;
description = ''
# Apple menu > System Preferences > Security and firewall
Apple menu > System Preferences > Security and firewall
Drops incoming requests via ICMP such as ping requests. Default is 0.
0 = disabled

View file

@ -8,7 +8,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Displays login window as a name and password field instead of a list of users.
Default is false.
'';
@ -18,7 +19,8 @@ with lib;
type = types.nullOr types.str;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Auto login the supplied user on boot. Default is Off.
'';
};
@ -27,7 +29,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Allow users to login to the machine as guests using the Guest account. Default is true.
'';
};
@ -44,7 +47,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Hides the Shut Down button on the login screen. Default is false.
'';
};
@ -53,7 +57,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Hides the Sleep button on the login screen. Default is false.
'';
};
@ -62,7 +67,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Hides the Restart button on the login screen. Default is false.
'';
};
@ -71,7 +77,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Disables the "Shutdown" option when users are logged in. Default is false.
'';
};
@ -80,7 +87,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
If set to true, the Power Off menu item will be disabled when the user is logged in. Default is false.
'';
};
@ -89,7 +97,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Users and Groups > Login Options
Apple menu > System Preferences > Users and Groups > Login Options
Disables the Restart option when users are logged in. Default is false.
'';
};

View file

@ -8,7 +8,8 @@ with lib;
type = types.nullOr types.bool;
default = null;
description = ''
# Apple menu > System Preferences > Mission Control
Apple menu > System Preferences > Mission Control
Displays have separate Spaces (note a logout is required before
this setting will take effect).

View file

@ -29,9 +29,9 @@ in
description = ''
Set of patches to apply to <filename>/</filename>.
<warning>
<para>This can modify everything so use with caution.</para>
</warning>
<warning><para>
This can modify everything so use with caution.
</para></warning>
Useful for safely changing system files. Unlike the etc module this
won't remove or modify files with unexpected content.