summary refs log tree commit diff
path: root/modules/installer/cd-dvd/iso-image.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-10-09 11:44:50 -0400
committerShea Levy <shea@shealevy.com>2013-10-09 14:54:20 -0400
commit7f5e4f5eb80f31cc7e1885002e271b0c08fad915 (patch)
tree1b65fcd428ff64cd734f8ca28aa0290304c03a53 /modules/installer/cd-dvd/iso-image.nix
parent596a7cbb6d760d2ea1850d903f85011b61039332 (diff)
downloadnixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar.gz
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar.bz2
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar.lz
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar.xz
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.tar.zst
nixpkgs-7f5e4f5eb80f31cc7e1885002e271b0c08fad915.zip
Update efi install cd
Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'modules/installer/cd-dvd/iso-image.nix')
-rw-r--r--modules/installer/cd-dvd/iso-image.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix
index 9e4352e48bb..de9728d677c 100644
--- a/modules/installer/cd-dvd/iso-image.nix
+++ b/modules/installer/cd-dvd/iso-image.nix
@@ -44,31 +44,31 @@ let
 
 
   # The efi boot image
-  efiImg = pkgs.runCommand "efi-image_eltorito" {}
+  efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools ]; }
     ''
       #Let's hope 10M is enough
       dd bs=2048 count=5120 if=/dev/zero of="$out"
       ${pkgs.dosfstools}/sbin/mkfs.vfat "$out"
-      ${pkgs.mtools}/bin/mmd -i "$out" efi
-      ${pkgs.mtools}/bin/mmd -i "$out" efi/boot
-      ${pkgs.mtools}/bin/mmd -i "$out" efi/nixos
-      ${pkgs.mtools}/bin/mmd -i "$out" loader
-      ${pkgs.mtools}/bin/mmd -i "$out" loader/entries
-      ${pkgs.mtools}/bin/mcopy -v -i "$out" \
+      mmd -i "$out" efi
+      mmd -i "$out" efi/boot
+      mmd -i "$out" efi/nixos
+      mmd -i "$out" loader
+      mmd -i "$out" loader/entries
+      mcopy -v -i "$out" \
         ${pkgs.gummiboot}/lib/gummiboot/gummiboot${targetArch}.efi \
         ::efi/boot/boot${targetArch}.efi
-      ${pkgs.mtools}/bin/mcopy -v -i "$out" \
-        ${config.boot.kernelPackages.kernel + "/bzImage"} ::bzImage
-      ${pkgs.mtools}/bin/mcopy -v -i "$out" \
-        ${config.system.build.initialRamdisk + "/initrd"} ::efi/nixos/initrd
+      mcopy -v -i "$out" \
+        ${config.boot.kernelPackages.kernel}/bzImage ::bzImage
+      mcopy -v -i "$out" \
+        ${config.system.build.initialRamdisk}/initrd ::efi/nixos/initrd
       echo "title NixOS LiveCD" > boot-params
       echo "linux /bzImage" >> boot-params
       echo "initrd /efi/nixos/initrd" >> boot-params
       echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}" >> boot-params
-      ${pkgs.mtools}/bin/mcopy -v -i "$out" boot-params ::loader/entries/nixos-livecd.conf
+      mcopy -v -i "$out" boot-params ::loader/entries/nixos-livecd.conf
       echo "default nixos-livecd" > boot-params
       echo "timeout 5" >> boot-params
-      ${pkgs.mtools}/bin/mcopy -v -i "$out" boot-params ::loader/loader.conf
+      mcopy -v -i "$out" boot-params ::loader/loader.conf
     '';
 
   targetArch = if pkgs.stdenv.isi686 then
@@ -194,8 +194,6 @@ in
 
     boot.initrd.kernelModules = [ "loop" ];
 
-    boot.kernelModules = optional config.isoImage.makeEfiBootable "efivars";
-
     # In stage 1, mount a tmpfs on top of / (the ISO image) and
     # /nix/store (the squashfs image) to make this a live CD.
     boot.initrd.postMountCommands =