diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index 10912a26a031..e5921492069c 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -4,23 +4,6 @@ Installation - - -
- -Obtaining NixOS - -NixOS ISO images can be downloaded from the NixOS -homepage. These can be burned onto a CD. It is also possible -to copy them onto a USB stick and install NixOS from there. For -details, see the NixOS -Wiki. - -
- -
@@ -38,8 +21,8 @@ Wiki. ifconfig). Networking is necessary for the installer, since it will download lots of stuff (such as source tarballs or Nixpkgs channel binaries). It’s best if you have a DHCP - server on your network. Otherwise configure networking manually - using ifconfig. + server on your network. Otherwise configure + manually. The NixOS manual is available on virtual console 8 (press Alt+F8 to access). @@ -47,9 +30,6 @@ Wiki. Login as root, empty password. - If you downloaded the graphical ISO image, you can - run start xserver to start KDE. - The NixOS installer doesn’t do any partitioning or formatting yet, so you need to that yourself. Use the following commands: @@ -59,9 +39,12 @@ Wiki. For partitioning: fdisk. - For initialising Ext4 partitions: - mkfs.ext4. It is recommended that you assign a - unique symbolic label to the file system using the option + For initialising Ext2/Ext3 partitions: + mke2fs. Ext3 is recommended; use the + to create a journalled file system. For + faster access to the Nix store, you may also want to use the + . It is also recommended that you + assign a unique symbolic label to the file system using the option . This will make the file system configuration independent from device changes. @@ -79,42 +62,43 @@ $ vgcreate MyVolGroup /dev/sda1 /dev/sdb1 $ lvcreate --size 2G --name bigdisk MyVolGroup $ lvcreate --size 1G --name smalldisk MyVolGroup - + Possibly you’ll need to do initctl start + lvm after this (TODO: check whether this is + needed). - For creating software RAID devices, use + For creating software RAID devices: mdadm. - Mount the target file system on which NixOS should - be installed on /mnt. + Mount the target file system on + /mnt on which NixOS would be installed. + - You now need to create a file - /mnt/etc/nixos/configuration.nix that - specifies the intended configuration of the system. This is - because NixOS has a declarative configuration - model: you create or edit a description of the configuration that - you want to be built and activated, and then NixOS takes care of - realising that configuration. The command - nixos-option can generate an initial - configuration file for you: + Generate a template configuration for the target system: + + The command nixos-option can + generate an initial configuration file for you, i.e., $ nixos-option --install - It tries to figure out the kernel modules necessary for mounting - the root device, as well as various other hardware - characteristics. However, it doesn’t try to figure out the + It tries to figure out the modules necessary for mounting the root + device, as well as various other hardware characteristics. + However, it doesn’t try to figure out the option yet. - You should edit - /mnt/etc/nixos/configuration.nix to suit your - needs. The text editors nano and - vim are available. + Edit /mnt/etc/nixos/configuration.nix to + configure your system. The installation is declarative; you need to + write a description of the configuration that you want to be built and + activated. The configuration is specified in a Nix expression and must + be stored on the target file system. The text + editors nano and vim are + available. You need to specify a root file system in and the target device for the Grub boot @@ -126,12 +110,12 @@ $ nixos-option --install all kernel modules that are necessary for mounting the root file system, otherwise the installed system will not be able to boot. (If this happens, boot - from the CD again, mount the target file system on + from CD again, mount the target file system on /mnt, fix /mnt/etc/nixos/configuration.nix and rerun - nixos-install.) In most cases, - nixos-option --install will figure out the - required modules. + nixos-install.) + nixos-hardware-scan should figure out the + required modules in most cases. Examples are available in /etc/nixos/nixos/doc/config-examples and some @@ -139,14 +123,13 @@ $ nixos-option --install xlink:href="https://nixos.org/repos/nix/configurations/trunk/"/>. - + If your machine has a limited amount of memory, you may want to activate swap devices now (swapon device). The installer (or rather, the build actions that it may spawn) may need quite a bit of RAM, depending on your configuration. - Do the installation: @@ -163,7 +145,7 @@ $ nixos-install Cross fingers. - If everything went well: + If everything went well: $ reboot @@ -177,7 +159,7 @@ $ reboot configurations (initially just one). Every time you change the NixOS configuration (see ), a new item appears in the menu. - This allows you to easily roll back to another configuration if + This allows you to go back easily to another configuration if something goes wrong. You should log in and change the root @@ -210,8 +192,10 @@ $ nix-env -i w3m shows a typical sequence of commands for installing NixOS on an empty hard drive (here -/dev/sda). shows a -corresponding configuration Nix expression. +/dev/sda). shows a +corresponding configuration Nix expression. + + Commands for installing NixOS on <filename>/dev/sda</filename>