2007-02-06 21:25:36 +00:00
|
|
|
<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
|
2007-02-19 22:33:44 +00:00
|
|
|
<filename>system/system.nix</filename> (e.g.,
|
|
|
|
<literal>bootStage1</literal>).</para>
|
2007-02-06 21:25:36 +00:00
|
|
|
|
|
|
|
</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>
|