From 26417566c47f643c3e8e1a5a7793938bb93f04b8 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 25 Sep 2010 22:30:02 +0000 Subject: [PATCH] Re-word installation, and use "nixos-option --install" to generate a template for configuration.nix which uses the result of nixos-hardware-scan. svn path=/nixos/trunk/; revision=23926 --- doc/manual/installation.xml | 49 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index 09f97b235b7..330ef14e0fd 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -133,39 +133,32 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup - 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 in - /mnt/etc/nixos/configuration.nix. See - /etc/nixos/nixos/doc/config-examples for - example machine configurations. You can copy and edit one of - those (e.g., copy - /etc/nixos/nixos/doc/config-examples/basic.nix - to /mnt/etc/nixos/configuration.nix). See - for a list of the available - configuration options. The text editors nano - and vim are available. + Generate a template configuration for the target system: - In particular you need to specify a root file system in - and the target device for the Grub - boot loader in . - - The command nixos-hardware-scan can + The command nixos-option can generate an initial configuration file for you, i.e., -$ mkdir -p /mnt/etc/nixos -$ nixos-hardware-scan > /mnt/etc/nixos/configuration.nix +$ nixos-option --install 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 + However, it doesn’t try to figure out the option yet. - More examples of NixOS configurations for some actual - machines can be found at . + 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 + loader in . See + for a list of the available configuration + options. It is very important that you specify in the option all kernel modules that @@ -178,6 +171,11 @@ $ nixos-hardware-scan > /mnt/etc/nixos/configuration.nix nixos-hardware-scan should figure out the required modules in most cases. + Examples are available in + /etc/nixos/nixos/doc/config-examples and some + actual NixOS configuration can be found at . + If your machine has a limited amount of memory, you @@ -259,8 +257,7 @@ $ fdisk /dev/sda (or whatever device you want to install on)(idem) $ mkswap -L swap /dev/sda2 (idem) $ mount LABEL=nixos /mnt -$ mkdir -p /mnt/etc/nixos -$ nixos-hardware-scan > /mnt/etc/nixos/configuration.nix +$ nixos-option --install $ nano /mnt/etc/nixos/configuration.nix (in particular, set the fileSystems and swapDevices options) $ nixos-install