mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
grub: Make assertion lazier
This commit is contained in:
parent
34d61c53c2
commit
b33657df03
1 changed files with 8 additions and 7 deletions
|
@ -237,13 +237,14 @@ in
|
||||||
|
|
||||||
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
|
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
|
||||||
|
|
||||||
system.build = mkAssert (cfg.devices != [])
|
system.build.installBootLoader =
|
||||||
"You must set the ‘boot.loader.grub.device’ option to make the system bootable."
|
if cfg.devices == [] then
|
||||||
{ installBootLoader =
|
throw "You must set the ‘boot.loader.grub.device’ option to make the system bootable."
|
||||||
"PERL5LIB=${makePerlPath [ pkgs.perlPackages.XMLLibXML pkgs.perlPackages.XMLSAX ]} " +
|
else
|
||||||
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
|
"PERL5LIB=${makePerlPath [ pkgs.perlPackages.XMLLibXML pkgs.perlPackages.XMLSAX ]} " +
|
||||||
inherit grub;
|
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
|
||||||
};
|
|
||||||
|
system.build.grub = grub;
|
||||||
|
|
||||||
# Common attribute for boot loaders so only one of them can be
|
# Common attribute for boot loaders so only one of them can be
|
||||||
# set at once.
|
# set at once.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue