nixpkgs/modules/installer/grub/memtest.nix
Lluís Batlle i Rossell fbd4f65652 Fixing the comment on the new grub/memtest.nix module.
svn path=/nixos/trunk/; revision=33540
2012-04-02 17:31:08 +00:00

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;
'';
};
}