summary refs log tree commit diff
path: root/doc/config-examples/root-on-lvm.nix
blob: 2ea1e547921f85247982a979b1e8c9d7b35c011a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This configuration has / on a LVM volume.  Since Grub
# doesn't know about LVM, a separate /boot is therefore
# needed.
#
# In this example, labels are used for file systems and
# swap devices: "boot" might be /dev/sda1, "root" might be
# /dev/my-volume-group/root, and "swap" might be /dev/sda2.
# In particular there is no specific reference to the fact
# that / is on LVM; that's figured out automatically.

{
  boot.loader.grub.device = "/dev/sda";
  boot.initrd.kernelModules = ["ata_piix"];

  fileSystems = [
    { mountPoint = "/";
      label = "root";
    }
    { mountPoint = "/boot";
      label = "boot";
    }
  ];

  swapDevices = [
    { label = "swap"; }
  ];
}