* More manual.

svn path=/nixos/trunk/; revision=7869
This commit is contained in:
Eelco Dolstra 2007-02-06 21:25:36 +00:00
parent 9759134665
commit 5aed111620
4 changed files with 81 additions and 3 deletions

View File

@ -0,0 +1,47 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Development</title>
<para>This chapter has some random notes on hacking on
NixOS.</para>
<section>
<title>Building specific parts of NixOS</title>
<para>
<screen>
$ nix-build system/system.nix \
--arg configuration "import /etc/nixos/configuration.nix" \
-A <replaceable>attr</replaceable></screen>
where <replaceable>attr</replaceable> is an attribute in
system/system.nix (e.g., <literal>bootStage1</literal>).</para>
</section>
<section>
<title>Testing the installer</title>
<para>Building, burning, and booting from an installation CD is rather
tedious, so here is a quick way to see if the installer works
properly:
<screen>
$ nix-build .../nixos/configuration/rescue-cd.nix -A system.nixosInstall
$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
$ yes | mke2fs -j diskimage
$ mount -o loop diskimage /mnt
$ ./result/bin/nixos-install</screen>
</para>
</section>
</chapter>

View File

@ -143,7 +143,7 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
those (e.g., copy those (e.g., copy
<filename>/etc/nixos/nixos/configuration/examples/basic.nix</filename> <filename>/etc/nixos/nixos/configuration/examples/basic.nix</filename>
to <filename>/etc/nixos/configuration.nix</filename>). See <xref to <filename>/etc/nixos/configuration.nix</filename>). See <xref
linkend="sec-options"/> for a list of the available configuration linkend="ch-options"/> for a list of the available configuration
options. The text editor <command>nano</command> is options. The text editor <command>nano</command> is
available.</para> available.</para>
@ -191,7 +191,7 @@ $ reboot</screen>
<!--===============================================================--> <!--===============================================================-->
<section> <section xml:id="sec-changing-config">
<title>Changing the configuration</title> <title>Changing the configuration</title>
@ -238,4 +238,34 @@ whether everything compiles cleanly.</para>
</section> </section>
<!--===============================================================-->
<section>
<title>Keeping NixOS up to date</title>
<para>The currently best way to keep your NixOS installation up to
date is to track the NixOS Subversion repository. You should replace
the static NixOS/Nixpkgs sources installed in
<filename>/etc/nixos</filename> with a Subversion checkout. The
program <command>nixos-checkout</command> does that for you (and it
also installs Subversion into your current profile).</para>
<para>To build the latest and greatest, do
<screen>
$ svn up /etc/nixos/nixos
$ svn up /etc/nixos/nixpkgs
$ nixos-rebuild switch</screen>
(Or instead of <literal>switch</literal>, use any of the alternatives
shown in <xref linkend="sec-changing-config"/>.)</para>
</section>
</chapter> </chapter>

View File

@ -36,6 +36,7 @@
<xi:include href="installation.xml" /> <xi:include href="installation.xml" />
<xi:include href="development.xml" />
<xi:include href="options-db.xml" /> <xi:include href="options-db.xml" />
</book> </book>

View File

@ -13,7 +13,7 @@
<xsl:template match="/expr/list"> <xsl:template match="/expr/list">
<chapter xml:id="sec-options"> <chapter xml:id="ch-options">
<title>List of Options</title> <title>List of Options</title>
<variablelist> <variablelist>