summary refs log tree commit diff
path: root/nixos/modules/virtualisation/hyperv-image.nix
diff options
context:
space:
mode:
authorEvan Stoll <evanjsx@gmail.com>2020-05-20 19:34:41 -0400
committerEvan Stoll <evanjsx@gmail.com>2020-05-20 19:56:38 -0400
commitef80f345bed200ba106e58fac4726d235e7bdb3c (patch)
treec0f8007c011b1313268e05865ceefacf3b161d0e /nixos/modules/virtualisation/hyperv-image.nix
parent0f1eb8cd79182640fb26db149c6810b013e8209f (diff)
downloadnixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar.gz
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar.bz2
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar.lz
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar.xz
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.tar.zst
nixpkgs-ef80f345bed200ba106e58fac4726d235e7bdb3c.zip
virtualisation/hyperv-image: remove diskImage after vhdx is generated
Diffstat (limited to 'nixos/modules/virtualisation/hyperv-image.nix')
-rw-r--r--nixos/modules/virtualisation/hyperv-image.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/hyperv-image.nix b/nixos/modules/virtualisation/hyperv-image.nix
index be2f12b7d01..fabc9113dfc 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;