1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/modules/installer/grub/memtest.nix
Lluís Batlle i Rossell 849d136aa6 Making also the system-tarball-pc show the memtest entry as the
pkgs.memtest86.name.


svn path=/nixos/trunk/; revision=33693
2012-04-09 20:37:54 +00:00

34 lines
660 B
Nix

# This module allows getting memtest86 in grub menus.
{config, pkgs, ...}:
with pkgs.lib;
let
isEnabled = config.boot.loader.grub.memtest86;
memtest86 = pkgs.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.name}" {
linux16 $bootRoot/memtest.bin
}
'';
extraPrepareConfig =
''
cp ${memtest86}/memtest.bin /boot/memtest.bin;
'';
};
}