summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-30 15:44:47 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-30 16:04:15 +0200
commite68b0c7f5f14b4bef23303ec0316bcce88f05300 (patch)
treef22415f5075e5f622a7e9b990b2d36292566627a /nixos/modules/installer
parentd45dcf348e451dd56c0c994a894f4c22b653fb71 (diff)
downloadnixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar.gz
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar.bz2
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar.lz
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar.xz
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.tar.zst
nixlib-e68b0c7f5f14b4bef23303ec0316bcce88f05300.zip
Mount unionfs-fuse filesystems using the normal fileSystems option
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 6250fac0f0bb..d43fa2203818 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -191,6 +191,8 @@ in
         noCheck = true;
       };
 
+    # In stage 1, mount a tmpfs on top of /nix/store (the squashfs
+    # image) to make this a live CD.
     fileSystems."/nix/.ro-store" =
       { fsType = "squashfs";
         device = "/iso/nix-store.squashfs";
@@ -204,18 +206,16 @@ in
         neededForBoot = true;
       };
 
+    fileSystems."/nix/store" =
+      { fsType = "unionfs-fuse";
+        device = "unionfs";
+        options = "allow_other,cow,nonempty,chroot=/mnt-root,max_files=32768,hide_meta_files,dirs=/nix/.rw-store=rw:/nix/.ro-store=ro";
+      };
+
     boot.initrd.availableKernelModules = [ "squashfs" "iso9660" ];
 
     boot.initrd.kernelModules = [ "loop" ];
 
-    # In stage 1, mount a tmpfs on top of /nix/store (the squashfs
-    # image) to make this a live CD.
-    boot.initrd.postMountCommands =
-      ''
-        mkdir -p $targetRoot/nix/store
-        unionfs -o allow_other,cow,nonempty,chroot=$targetRoot,max_files=32768 /nix/.rw-store=RW:/nix/.ro-store=RO $targetRoot/nix/store
-      '';
-
     # Closures to be copied to the Nix store on the CD, namely the init
     # script and the top-level system configuration directory.
     isoImage.storeContents =
@@ -311,8 +311,8 @@ in
       '';
 
     # Add vfat support to the initrd to enable people to copy the
-    # contents of the CD to a bootable USB stick. Need unionfs-fuse for union mounts
-    boot.initrd.supportedFilesystems = [ "vfat" "unionfs-fuse" ];
+    # contents of the CD to a bootable USB stick.
+    boot.initrd.supportedFilesystems = [ "vfat" ];
 
   };