make-disk-image: set image format explicitly

QEMU warns if format=raw is implied, and protects block 0 from getting
overwritten.
This commit is contained in:
Wim de With 2024-01-12 14:15:58 +01:00 committed by mergify[bot]
parent c38f369ee4
commit b4afc8bab8

View File

@ -64,7 +64,7 @@ let
${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches ""
umount -Rv ${systemToInstall.config.disko.rootMountPoint}
'';
QEMU_OPTS = lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report") (lib.attrValues nixosConfig.config.disko.devices.disk);
QEMU_OPTS = lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report,format=raw") (lib.attrValues nixosConfig.config.disko.devices.disk);
in
{
pure = vmTools.runInLinuxVM (pkgs.runCommand name