virtualisation/qemu-vm: escape bash variable in shell script

Fixes #229729
This commit is contained in:
Peter Kling 2023-05-04 09:52:49 +02:00 committed by GitHub
parent 35e6df34dc
commit 996db6d059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ let
${concatStringsSep " \\\n" ([ "-f qcow2" ]
++ optional (cfg.useBootLoader && cfg.useDefaultFilesystems) "-F qcow2 -b ${systemImage}/nixos.qcow2"
++ optional (!(cfg.useBootLoader && cfg.useDefaultFilesystems)) "-o size=${toString config.virtualisation.diskSize}M"
++ [ "$NIX_DISK_IMAGE" ])}
++ [ ''"$NIX_DISK_IMAGE"'' ])}
echo "Virtualisation disk image created."
fi