diff options
author | Shea Levy <shea@shealevy.com> | 2012-12-16 13:07:42 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2012-12-16 13:07:42 -0500 |
commit | d19c223ba6285da363e8bb8022e67a52c7bb9e0a (patch) | |
tree | 8cc87dac172456947d08616fcb297b2558b85d57 /modules/virtualisation | |
parent | e34024d998291899f9239ef43c3d74363108417f (diff) | |
download | nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar.gz nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar.bz2 nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar.lz nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar.xz nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.tar.zst nixlib-d19c223ba6285da363e8bb8022e67a52c7bb9e0a.zip |
Simplify unionfs-chroot bind-mounting
Diffstat (limited to 'modules/virtualisation')
-rw-r--r-- | modules/virtualisation/qemu-vm.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix index 8d50da8296c0..0367379b2444 100644 --- a/modules/virtualisation/qemu-vm.nix +++ b/modules/virtualisation/qemu-vm.nix @@ -286,12 +286,12 @@ in mkdir -p $targetRoot/boot mount -o remount,ro $targetRoot/nix/store ${optionalString cfg.writableStore '' - mkdir -p /unionfs-chroot$targetRoot - mount --rbind $targetRoot /unionfs-chroot$targetRoot + mkdir -p /unionfs-chroot/ro-store + mount --rbind $targetRoot/nix/store /unionfs-chroot/ro-store - mkdir /unionfs-chroot/mnt-store-tmpfs - mount -t tmpfs -o "mode=755" none /unionfs-chroot/mnt-store-tmpfs - unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot /mnt-store-tmpfs=RW:$targetRoot/nix/store=RO $targetRoot/nix/store + mkdir /unionfs-chroot/rw-store + mount -t tmpfs -o "mode=755" none /unionfs-chroot/rw-store + unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot /rw-store=RW:/ro-store=RO $targetRoot/nix/store ''} ''; |