diff --git a/doc/manual/configuration.xml b/doc/manual/configuration.xml index 3ff8ca8f2408..a457012b528a 100644 --- a/doc/manual/configuration.xml +++ b/doc/manual/configuration.xml @@ -394,9 +394,82 @@ groups can be managed using groupadd, -
X11 +
Filesystems -The X11 windowing system provides the basis of NixOS’ graphical +You can define filesystems using the + configuration option. For instance, the +following definition causes NixOS to mount the Ext4 filesystem on +device /dev/disk/by-label/data onto the mount +point /data: + + +fileSystems."/data" = + { device = "/dev/disk/by-label/data"; + fsType = "ext4"; + }; + + +Mount points are created automatically if they don’t already exist. +For , it’s best to use the topology-independent +device aliases in /dev/disk/by-label and +/dev/disk/by-uuid, as these don’t change if the +topology changes (e.g. if a disk is moved to another IDE +controller). + +You can usually omit the filesystem type +(), since mount can usually +detect the type and load the necessary kernel module automatically. +However, if the filesystem is needed at early boot (in the initial +ramdisk) and is not ext2, ext3 +or ext4, then it’s best to specify + to ensure that the kernel module is +available. + +
LUKS-encrypted filesystems + +NixOS supports filesystems that are encrypted using +LUKS (Linux Unified Key Setup). For example, +here is how you create an encrypted Ext4 filesystem on the device +/dev/sda2: + + +$ cryptsetup luksFormat /dev/sda2 + +WARNING! +======== +This will overwrite data on /dev/sda2 irrevocably. + +Are you sure? (Type uppercase yes): YES +Enter LUKS passphrase: *** +Verify passphrase: *** + +$ cryptsetup luksOpen /dev/sda2 crypted +Enter passphrase for /dev/sda2: *** + +$ mkfs.ext4 /dev/mapper/crypted + + +To ensure that this filesystem is automatically mounted at boot time +as /, add the following to +configuration.nix: + + +boot.initrd.luks.devices = [ { device = "/dev/sda2"; name = "crypted"; } ]; +fileSystems."/".device = "/dev/mapper/crypted"; + + + + +
+ +
+ + + + +
X Window System + +The X Window System (X11) provides the basis of NixOS’ graphical user interface. It can be enabled as follows: services.xserver.enable = true;