grub module: suggest by-id paths for devices

Since they are more stable, their use should be encouraged over that of
potentially volatile identifiers like /dev/[sh]da.

Changed files
+5 -5
nixos
modules
system
boot
loader
grub
+5 -5
nixos/modules/system/boot/loader/grub/grub.nix
···
device = mkOption {
default = "";
-
example = "/dev/hda";
+
example = "/dev/disk/by-id/wwn-0x500001234567890a";
type = types.str;
description = ''
The device on which the GRUB boot loader will be installed.
···
devices = mkOption {
default = [];
-
example = [ "/dev/hda" ];
+
example = [ "/dev/disk/by-id/wwn-0x500001234567890a" ];
type = types.listOf types.str;
description = ''
The devices on which the boot loader, GRUB, will be
···
mirroredBoots = mkOption {
default = [ ];
example = [
-
{ path = "/boot1"; devices = [ "/dev/sda" ]; }
-
{ path = "/boot2"; devices = [ "/dev/sdb" ]; }
+
{ path = "/boot1"; devices = [ "/dev/disk/by-id/wwn-0x500001234567890a" ]; }
+
{ path = "/boot2"; devices = [ "/dev/disk/by-id/wwn-0x500009876543210a" ]; }
];
description = ''
Mirror the boot configuration to multiple partitions and install grub
···
devices = mkOption {
default = [ ];
-
example = [ "/dev/sda" "/dev/sdb" ];
+
example = [ "/dev/disk/by-id/wwn-0x500001234567890a" "/dev/disk/by-id/wwn-0x500009876543210a" ];
type = types.listOf types.str;
description = ''
The path to the devices which will have the GRUB MBR written.