nixos/grub: allow multiple "nodev" devices for mirroredBoots

For UEFI setups, "device" will generally be the special value "nodev"
which represents not running grub-install at all. Using "nodev" for
boot mirrors should therefore be allowed.
This commit is contained in:
Linus Heckemann 2020-09-09 07:37:17 +02:00
parent 61525137fd
commit fdd944526c

View file

@ -741,7 +741,7 @@ in
+ "'boot.loader.grub.mirroredBoots' to make the system bootable.";
}
{
assertion = cfg.efiSupport || all (c: c < 2) (mapAttrsToList (_: c: c) bootDeviceCounters);
assertion = cfg.efiSupport || all (c: c < 2) (mapAttrsToList (n: c: if n == "nodev" then 0 else c) bootDeviceCounters);
message = "You cannot have duplicated devices in mirroredBoots";
}
{