nixos doc: module meta attribute section cleanup
This commit is contained in:
@@ -4,20 +4,20 @@
|
|||||||
version="5.0"
|
version="5.0"
|
||||||
xml:id="sec-meta-attributes">
|
xml:id="sec-meta-attributes">
|
||||||
|
|
||||||
<title>Meta-attributes</title>
|
<title>Meta Attributes</title>
|
||||||
|
|
||||||
<para>Like Nix packages, NixOS modules can declare meta-attributes to provide
|
<para>Like Nix packages, NixOS modules can declare meta-attributes to provide
|
||||||
extra information. Module meta-attributes are defined in the
|
extra information. Module meta attributes are defined in the
|
||||||
<filename
|
<filename
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/meta.nix">meta.nix</filename>
|
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/meta.nix">meta.nix</filename>
|
||||||
special module.</para>
|
special module.</para>
|
||||||
|
|
||||||
<para><literal>meta</literal> is a top level attribute like
|
<para><literal>meta</literal> is a top level attribute like
|
||||||
<literal>options</literal> and <literal>config</literal>. Available
|
<literal>options</literal> and <literal>config</literal>. Available
|
||||||
meta-attributes are <literal>maintainers</literal> and
|
meta-attributes are <literal>maintainers</literal> and
|
||||||
<literal>doc</literal>.</para>
|
<literal>doc</literal>.</para>
|
||||||
|
|
||||||
<para>Each of the meta-attributes must be defined at most once per module
|
<para>Each of the meta-attributes must be defined at most once per module
|
||||||
file.</para>
|
file.</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@@ -26,13 +26,13 @@
|
|||||||
options = {
|
options = {
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with lib.maintainers; [ ericsagnes ]; <co
|
maintainers = with lib.maintainers; [ ericsagnes ]; <co
|
||||||
xml:id='modules-meta-1' />
|
xml:id='modules-meta-1' />
|
||||||
doc = ./default.xml; <co xml:id='modules-meta-2' />
|
doc = ./default.xml; <co xml:id='modules-meta-2' />
|
||||||
};
|
};
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
|
|
||||||
<callout arearefs='modules-meta-2'>
|
<callout arearefs='modules-meta-2'>
|
||||||
<para>
|
<para>
|
||||||
<varname>doc</varname> point to a valid docbook file containing the module
|
<varname>doc</varname> points to a valid DocBook file containing the module
|
||||||
documentation, its contents are automatically added to the <xref
|
documentation. Its contents is automatically added to <xref
|
||||||
linkend="ch-configuration"/>.
|
linkend="ch-configuration"/>.
|
||||||
Changes to a module documentation must be checked to be non-breaking by
|
Changes to a module documentation have to be checked to not break
|
||||||
building the NixOS manual.
|
building the NixOS manual:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>$ nix-build nixos/release.nix -A manual</programlisting>
|
<programlisting>$ nix-build nixos/release.nix -A manual</programlisting>
|
||||||
</callout>
|
</callout>
|
||||||
|
|||||||
Reference in New Issue
Block a user