mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
nixos/qemu: don't recreate extra disks
This commit is contained in:
parent
28740462e7
commit
399db54e35
@ -62,7 +62,9 @@ let
|
||||
idx=2
|
||||
extraDisks=""
|
||||
${flip concatMapStrings cfg.emptyDiskImages (size: ''
|
||||
${pkgs.qemu_kvm}/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "${toString size}M"
|
||||
if ! test -e "empty$idx.qcow2"; then
|
||||
${pkgs.qemu_kvm}/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "${toString size}M"
|
||||
fi
|
||||
extraDisks="$extraDisks -drive index=$idx,file=$(pwd)/empty$idx.qcow2,if=${cfg.qemu.diskInterface},werror=report"
|
||||
idx=$((idx + 1))
|
||||
'')}
|
||||
|
Loading…
Reference in New Issue
Block a user