From ef80f345bed200ba106e58fac4726d235e7bdb3c Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Wed, 20 May 2020 19:34:41 -0400 Subject: [PATCH] virtualisation/hyperv-image: remove diskImage after vhdx is generated --- nixos/modules/virtualisation/hyperv-image.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/virtualisation/hyperv-image.nix b/nixos/modules/virtualisation/hyperv-image.nix index be2f12b7d014..fabc9113dfc4 100644 --- a/nixos/modules/virtualisation/hyperv-image.nix +++ b/nixos/modules/virtualisation/hyperv-image.nix @@ -37,6 +37,7 @@ in { name = cfg.vmDerivationName; postVM = '' ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -o subformat=dynamic -O vhdx $diskImage $out/${cfg.vmFileName} + rm $diskImage ''; format = "raw"; diskSize = cfg.baseImageSize;