diff --git a/doc/manual/development.xml b/doc/manual/development.xml new file mode 100644 index 000000000000..58924658ca6d --- /dev/null +++ b/doc/manual/development.xml @@ -0,0 +1,47 @@ + + +Development + +This chapter has some random notes on hacking on +NixOS. + + +
+ +Building specific parts of NixOS + + + + +$ nix-build system/system.nix \ + --arg configuration "import /etc/nixos/configuration.nix" \ + -A attr + +where attr is an attribute in +system/system.nix (e.g., bootStage1). + +
+ + +
+ +Testing the installer + +Building, burning, and booting from an installation CD is rather +tedious, so here is a quick way to see if the installer works +properly: + + +$ 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 + + + +
+ + +
diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index fe3a1a7e72e6..f9c7743b23a6 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -143,7 +143,7 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup those (e.g., copy /etc/nixos/nixos/configuration/examples/basic.nix to /etc/nixos/configuration.nix). See for a list of the available configuration + linkend="ch-options"/> for a list of the available configuration options. The text editor nano is available. @@ -191,7 +191,7 @@ $ reboot -
+
Changing the configuration @@ -238,4 +238,34 @@ whether everything compiles cleanly.
+ + + +
+ +Keeping NixOS up to date + +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 +/etc/nixos with a Subversion checkout. The +program nixos-checkout does that for you (and it +also installs Subversion into your current profile). + +To build the latest and greatest, do + + +$ svn up /etc/nixos/nixos +$ svn up /etc/nixos/nixpkgs +$ nixos-rebuild switch + +(Or instead of switch, use any of the alternatives +shown in .) + + +
+ + + + \ No newline at end of file diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 51834234fb81..52313de1d8df 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -36,6 +36,7 @@ + \ No newline at end of file diff --git a/doc/manual/options-to-docbook.xsl b/doc/manual/options-to-docbook.xsl index 5f83cca474bd..3516a043900b 100644 --- a/doc/manual/options-to-docbook.xsl +++ b/doc/manual/options-to-docbook.xsl @@ -13,7 +13,7 @@ - + List of Options