about summary refs log tree commit diff
path: root/modules/virtualisation
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-12-16 12:33:36 -0500
committerShea Levy <shea@shealevy.com>2012-12-16 12:33:36 -0500
commite34024d998291899f9239ef43c3d74363108417f (patch)
tree693cbe839b68f7fae014d791026b15a2d34ec8f0 /modules/virtualisation
parent3eb0faf3178b6b16f2b0dc13480ab9da727bee42 (diff)
downloadnixlib-e34024d998291899f9239ef43c3d74363108417f.tar
nixlib-e34024d998291899f9239ef43c3d74363108417f.tar.gz
nixlib-e34024d998291899f9239ef43c3d74363108417f.tar.bz2
nixlib-e34024d998291899f9239ef43c3d74363108417f.tar.lz
nixlib-e34024d998291899f9239ef43c3d74363108417f.tar.xz
nixlib-e34024d998291899f9239ef43c3d74363108417f.tar.zst
nixlib-e34024d998291899f9239ef43c3d74363108417f.zip
Refactor common unionfs-fuse initrd prep into a separate module
Diffstat (limited to 'modules/virtualisation')
-rw-r--r--modules/virtualisation/qemu-vm.nix11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix
index 982a6b6db45b..8d50da8296c0 100644
--- a/modules/virtualisation/qemu-vm.nix
+++ b/modules/virtualisation/qemu-vm.nix
@@ -252,16 +252,12 @@ in
   boot.initrd.availableKernelModules =
     [ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" ];
 
-  # unionfs-fuse expects fuse to be loaded
-  boot.initrd.kernelModules = optional cfg.writableStore [ "fuse" ];
+  boot.initrd.supportedFilesystems = optional cfg.writableStore "unionfs-fuse";
 
   boot.initrd.extraUtilsCommands =
     ''
       # We need mke2fs in the initrd.
       cp ${pkgs.e2fsprogs}/sbin/mke2fs $out/bin
-    '' + optionalString cfg.writableStore ''
-      cp -v ${pkgs.fuse}/lib/libfuse* $out/lib
-      cp -v ${pkgs.unionfs-fuse}/bin/unionfs $out/bin
     '';
 
   boot.initrd.postDeviceCommands =
@@ -290,11 +286,6 @@ in
       mkdir -p $targetRoot/boot
       mount -o remount,ro $targetRoot/nix/store
       ${optionalString cfg.writableStore ''
-        # Hacky!!! fuse hard-codes the path to mount
-        mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin
-        ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin
-        ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin
-
         mkdir -p /unionfs-chroot$targetRoot
         mount --rbind $targetRoot /unionfs-chroot$targetRoot