summary refs log tree commit diff
path: root/pkgs/build-support/vm
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-02-16 01:46:28 +0100
committeraszlig <aszlig@redmoonstudios.org>2014-02-26 04:51:57 +0100
commit0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c (patch)
tree562ce0c3483d649e6e310a12b2cc0d6d38175193 /pkgs/build-support/vm
parentaa65a7057f3abba32726ed17853090bcb86992f9 (diff)
downloadnixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar.gz
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar.bz2
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar.lz
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar.xz
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.tar.zst
nixlib-0ce1fd07fe7e59115af60dd33a9e668cbb1ebd4c.zip
vm/windows: Reintroduce setting up /nix/store.
Now we're doing this at the point where we're saving the VM state.
Unfortunately it's not quite right, because the controller VM is shut
down _before_ we're saving the state, so the share gets disconnected
despite autodisconnect being deactivated during setup.

We can get around this issue by finally introducing the xchg share,
which is the last item to be implemented before we can merge to master.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/build-support/vm')
-rw-r--r--pkgs/build-support/vm/windows/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/build-support/vm/windows/default.nix b/pkgs/build-support/vm/windows/default.nix
index 2ecadbae7cfb..b7c18f6d16c5 100644
--- a/pkgs/build-support/vm/windows/default.nix
+++ b/pkgs/build-support/vm/windows/default.nix
@@ -17,6 +17,13 @@ let
   });
 
   runAndSuspend = runInVM "winvm.img" {
+    command = lib.concatStringsSep "; " [
+      "set -e"
+      "net config server /autodisconnect:-1"
+      "net use S: '\\\\192.168.0.2\\nixstore' /persistent:yes"
+      "mkdir -p /nix/store"
+      "mount -o bind /cygdrive/s /nix/store"
+    ];
     suspendTo = "state.gz";
   };