aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mk-sandbox-system.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mk-sandbox-system.nix b/lib/mk-sandbox-system.nix
index c24ffa0..b2d85e2 100644
--- a/lib/mk-sandbox-system.nix
+++ b/lib/mk-sandbox-system.nix
@@ -44,7 +44,7 @@ rec {
44 44
45 virtualisation = { 45 virtualisation = {
46 graphics = lib.mkDefault false; 46 graphics = lib.mkDefault false;
47 diskImage = lib.mkDefault "$(mktemp).qcow2"; 47 diskImage = lib.mkDefault "$TMP_DISK";
48 48
49 sharedDirectories.host = { 49 sharedDirectories.host = {
50 source = "$SHARED_CWD"; 50 source = "$SHARED_CWD";
@@ -89,6 +89,10 @@ rec {
89 SHARED_CWD=$PWD 89 SHARED_CWD=$PWD
90 export SHARED_CWD 90 export SHARED_CWD
91 91
92 TMP_DISK="$(mktemp).qcow2"
93 export TMP_DISK
94 trap "rm -f \"$TMP_DISK\"" EXIT
95
92 ${packages.${name}}/bin/run-${name}-vm 96 ${packages.${name}}/bin/run-${name}-vm
93 97
94 reset 98 reset