mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-22 09:20:58 +03:00
* Generate a manual page for configuration.nix containing all the
options. svn path=/nixos/branches/modular-nixos/; revision=16358
This commit is contained in:
parent
a27f3942ef
commit
896a9f0508
6 changed files with 89 additions and 13 deletions
|
@ -32,18 +32,28 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
ensureDir $out
|
|
||||||
ln -s $sources/*.xml .
|
ln -s $sources/*.xml .
|
||||||
ln -s ${optionsDocBook} options-db.xml
|
ln -s ${optionsDocBook} options-db.xml
|
||||||
|
|
||||||
|
dst=$out/share/doc/nixos
|
||||||
|
ensureDir $dst
|
||||||
xsltproc $xsltFlags --nonet --xinclude \
|
xsltproc $xsltFlags --nonet --xinclude \
|
||||||
--output $out/manual.html \
|
--output $dst/manual.html \
|
||||||
${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
|
${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
|
||||||
./manual.xml
|
./manual.xml
|
||||||
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $out/
|
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $dst/
|
||||||
cp ${./style.css} $out/style.css
|
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
|
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
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
38
doc/manual/man-configuration.xml
Normal file
38
doc/manual/man-configuration.xml
Normal 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
28
doc/manual/man-pages.xml
Normal 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>
|
|
@ -35,7 +35,7 @@
|
||||||
problems here and there. Extensive familiarity with Linux is
|
problems here and there. Extensive familiarity with Linux is
|
||||||
recommended. If you encounter problems, please report them on the
|
recommended. If you encounter problems, please report them on the
|
||||||
<literal>nix-dev@cs.uu.nl</literal> mailing list or on <link
|
<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>
|
</preface>
|
||||||
|
|
||||||
|
@ -44,6 +44,9 @@
|
||||||
<xi:include href="userconfiguration.xml" />
|
<xi:include href="userconfiguration.xml" />
|
||||||
<xi:include href="troubleshooting.xml" />
|
<xi:include href="troubleshooting.xml" />
|
||||||
<xi:include href="development.xml" />
|
<xi:include href="development.xml" />
|
||||||
|
<chapter xml:id="ch-options">
|
||||||
|
<title>List of Options</title>
|
||||||
<xi:include href="options-db.xml" />
|
<xi:include href="options-db.xml" />
|
||||||
|
</chapter>
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
|
|
||||||
<xsl:template match="/expr/list">
|
<xsl:template match="/expr/list">
|
||||||
|
|
||||||
<chapter xml:id="ch-options">
|
|
||||||
<title>List of Options</title>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<xsl:for-each select="attrs">
|
<xsl:for-each select="attrs">
|
||||||
|
@ -39,6 +36,7 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Default:</emphasis>
|
<emphasis>Default:</emphasis>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="attr[@name = 'default']">
|
<xsl:when test="attr[@name = 'default']">
|
||||||
<literal>
|
<literal>
|
||||||
|
@ -54,6 +52,7 @@
|
||||||
<xsl:if test="attr[@name = 'example']">
|
<xsl:if test="attr[@name = 'example']">
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Example:</emphasis>
|
<emphasis>Example:</emphasis>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
<literal>
|
<literal>
|
||||||
<xsl:apply-templates select="attr[@name = 'example']" />
|
<xsl:apply-templates select="attr[@name = 'example']" />
|
||||||
</literal>
|
</literal>
|
||||||
|
@ -68,8 +67,6 @@
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</chapter>
|
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue