diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-02 12:29:07 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-02 12:33:06 +0200 |
commit | c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4 (patch) | |
tree | b2ab6c59bfdf0d083822a6b493f73711259cbebc /modules/system/boot/loader/grub/grub.nix | |
parent | 1c58fbe4a9850f03f58afcff12823931b4db881d (diff) | |
download | nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar.gz nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar.bz2 nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar.lz nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar.xz nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.tar.zst nixlib-c13041c65cdf9c188aa3ef4ee9f0f7d5e7603dc4.zip |
Unify the two Memtest modules
This means we now have Memtest86+ on the installation CD.
Diffstat (limited to 'modules/system/boot/loader/grub/grub.nix')
-rw-r--r-- | modules/system/boot/loader/grub/grub.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/system/boot/loader/grub/grub.nix b/modules/system/boot/loader/grub/grub.nix index 4208465d5908..85845cd2cd9f 100644 --- a/modules/system/boot/loader/grub/grub.nix +++ b/modules/system/boot/loader/grub/grub.nix @@ -150,6 +150,19 @@ in ''; }; + extraFiles = mkOption { + default = {}; + example = literalExample '' + { "memtest.bin" = "${pkgs.memtest86plus}/memtest.bin"; } + ''; + description = '' + A set of files to be copied to <filename>/boot</filename>. + Each attribute name denotes the destination file name in + <filename>/boot</filename>, while the corresponding + attribute value specifies the source file. + ''; + }; + splashImage = mkOption { default = if cfg.version == 1 @@ -225,6 +238,11 @@ in environment.systemPackages = [ grub ]; + boot.loader.grub.extraPrepareConfig = + concatStrings (mapAttrsToList (n: v: '' + ${pkgs.coreutils}/bin/cp -pf "${v}" "/boot/${n}" + '') config.boot.loader.grub.extraFiles); + }; } |