From 84ef1ec7e542d12a923b26a5da11e58107fc64fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Partheym=C3=BCller?= Date: Wed, 10 Mar 2021 11:09:49 +0100 Subject: [PATCH] win: cdimage naming, closure shrinking --- wfvm/win.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wfvm/win.nix b/wfvm/win.nix index d189a3e..45ffe99 100644 --- a/wfvm/win.nix +++ b/wfvm/win.nix @@ -86,7 +86,7 @@ let "usb-storage,drive=virtio-win" # USB boot "-drive" - "id=win-install,file=usbimage.img,if=none,format=raw,readonly=on,media=${if efi then "disk" else "cdrom"}" + "id=win-install,file=${if efi then "usb" else "cd"}image.img,if=none,format=raw,readonly=on,media=${if efi then "disk" else "cdrom"}" "-device" "usb-storage,drive=win-install" # Output image @@ -99,7 +99,7 @@ let '' #!${pkgs.runtimeShell} set -euxo pipefail - export PATH=${lib.makeBinPath [ p7zip utils.qemu libguestfs pkgs.wimlib pkgs.cdrkit ]}:$PATH + export PATH=${lib.makeBinPath [ p7zip utils.qemu libguestfs pkgs.wimlib ]}:$PATH # Create a bootable "USB" image # Booting in USB mode circumvents the "press any key to boot from cdrom" prompt @@ -128,7 +128,7 @@ let ${if efi then '' virt-make-fs --partition --type=fat win/ usbimage.img '' else '' - mkisofs -iso-level 4 -l -R -udf -D -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -hide boot.catalog -eltorito-alt-boot -o usbimage.img win/ + ${pkgs.cdrkit}/bin/mkisofs -iso-level 4 -l -R -udf -D -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -hide boot.catalog -eltorito-alt-boot -o cdimage.img win/ ''} rm -rf win