fbd4f65652
svn path=/nixos/trunk/; revision=33540
33 lines
629 B
Nix
33 lines
629 B
Nix
# This module allows getting memtest86+ in grub menus.
|
|
|
|
{config, pkgs, ...}:
|
|
|
|
with pkgs.lib;
|
|
let
|
|
isEnabled = config.boot.loader.grub.memtest86;
|
|
in
|
|
{
|
|
options = {
|
|
boot.loader.grub.memtest86 = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
Add a menu entry in grub for memtest86+
|
|
'';
|
|
};
|
|
};
|
|
|
|
config.boot.loader.grub = mkIf isEnabled {
|
|
extraEntries =
|
|
''
|
|
menuentry "Memtest86+" {
|
|
linux16 $bootRoot/memtest.bin
|
|
}
|
|
'';
|
|
extraPrepareConfig =
|
|
''
|
|
cp ${pkgs.memtest86}/memtest.bin /boot/memtest.bin;
|
|
'';
|
|
};
|
|
}
|