* Generate a manual page for configuration.nix containing all the

options.

svn path=/nixos/branches/modular-nixos/; revision=16358
This commit is contained in:
Eelco Dolstra 2009-07-14 15:47:03 +00:00
parent a27f3942ef
commit 896a9f0508
6 changed files with 89 additions and 13 deletions

View file

@ -32,18 +32,28 @@ let
'';
buildCommand = ''
ensureDir $out
ln -s $sources/*.xml .
ln -s ${optionsDocBook} options-db.xml
dst=$out/share/doc/nixos
ensureDir $dst
xsltproc $xsltFlags --nonet --xinclude \
--output $out/manual.html \
--output $dst/manual.html \
${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
./manual.xml
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $out/
cp ${./style.css} $out/style.css
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $dst/
cp ${./style.css} $dst/style.css
ensureDir $out/share/man
xsltproc --nonet --xinclude \
--param man.output.in.separate.dir 1 \
--param man.output.base.dir "'$out/share/man/'" \
${pkgs.docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
./man-pages.xml
ensureDir $out/nix-support
echo "doc manual $out manual.html" >> $out/nix-support/hydra-build-products
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
'';
};

View file

@ -246,7 +246,7 @@ $ nix-env -qa \*</screen>
shows what packages are available, and
<screen>
<screen>
$ nix-env -i w3m</screen>
install the <literal>w3m</literal> browser.</para>

View file

@ -0,0 +1,38 @@
<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refmeta>
<refentrytitle><filename>configuration.nix</filename></refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo class="source">NixOS</refmiscinfo>
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
</refmeta>
<refnamediv>
<refname><filename>configuration.nix</filename></refname>
<refpurpose>NixOS system configuration specification</refpurpose>
</refnamediv>
<refsection><title>Description</title>
<para>The file <filename>/etc/nixos/configuration.nix</filename>
contains the declarative specification of your NixOS system
configuration. The command <command>nixos-rebuild</command> takes
this file and realises the system configuration specified
therein.</para>
</refsection>
<refsection><title>Options</title>
<para>You can use the following options in
<filename>configuration.nix</filename>.</para>
<xi:include href="options-db.xml" />
</refsection>
</refentry>

28
doc/manual/man-pages.xml Normal file
View file

@ -0,0 +1,28 @@
<reference xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>NixOS Reference Pages</title>
<info>
<author>
<personname>
<firstname>Eelco</firstname>
<surname>Dolstra</surname>
</personname>
<contrib>Author</contrib>
</author>
<copyright>
<year>2007</year>
<year>2008</year>
<year>2009</year>
<holder>Eelco Dolstra</holder>
</copyright>
</info>
<xi:include href="man-configuration.xml" />
</reference>

View file

@ -35,7 +35,7 @@
problems here and there. Extensive familiarity with Linux is
recommended. If you encounter problems, please report them on the
<literal>nix-dev@cs.uu.nl</literal> mailing list or on <link
xlink:href="irc://irc.freenode.net/#trace" />.</para>
xlink:href="irc://irc.freenode.net/#nixos" />.</para>
</preface>
@ -44,6 +44,9 @@
<xi:include href="userconfiguration.xml" />
<xi:include href="troubleshooting.xml" />
<xi:include href="development.xml" />
<xi:include href="options-db.xml" />
<chapter xml:id="ch-options">
<title>List of Options</title>
<xi:include href="options-db.xml" />
</chapter>
</book>

View file

@ -13,9 +13,6 @@
<xsl:template match="/expr/list">
<chapter xml:id="ch-options">
<title>List of Options</title>
<variablelist>
<xsl:for-each select="attrs">
@ -39,6 +36,7 @@
<para>
<emphasis>Default:</emphasis>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="attr[@name = 'default']">
<literal>
@ -54,6 +52,7 @@
<xsl:if test="attr[@name = 'example']">
<para>
<emphasis>Example:</emphasis>
<xsl:text> </xsl:text>
<literal>
<xsl:apply-templates select="attr[@name = 'example']" />
</literal>
@ -68,8 +67,6 @@
</variablelist>
</chapter>
</xsl:template>