nova-image.nix: Replace the commented-out aufs mount with a commented-out unionfs-fuse mount
This commit is contained in:
parent
ac9002ce18
commit
ae4c8e3e0b
@ -72,10 +72,6 @@ with pkgs.lib;
|
|||||||
|
|
||||||
boot.kernelParams = [ "console=ttyS0" ];
|
boot.kernelParams = [ "console=ttyS0" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "aufs" ];
|
|
||||||
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.aufs ];
|
|
||||||
|
|
||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.loader.grub.timeout = 0;
|
boot.loader.grub.timeout = 0;
|
||||||
@ -83,8 +79,8 @@ with pkgs.lib;
|
|||||||
# Put /tmp and /var on /ephemeral0, which has a lot more space.
|
# Put /tmp and /var on /ephemeral0, which has a lot more space.
|
||||||
# Unfortunately we can't do this with the `fileSystems' option
|
# Unfortunately we can't do this with the `fileSystems' option
|
||||||
# because it has no support for creating the source of a bind
|
# because it has no support for creating the source of a bind
|
||||||
# mount. Also, "move" /nix to /ephemeral0 by layering an AUFS
|
# mount. Also, "move" /nix to /ephemeral0 by layering a unionfs-fuse
|
||||||
# on top of it so we have a lot more space for Nix operations.
|
# mount on top of it so we have a lot more space for Nix operations.
|
||||||
/*
|
/*
|
||||||
boot.initrd.postMountCommands =
|
boot.initrd.postMountCommands =
|
||||||
''
|
''
|
||||||
@ -96,9 +92,16 @@ with pkgs.lib;
|
|||||||
mkdir -m 755 -p $targetRoot/var
|
mkdir -m 755 -p $targetRoot/var
|
||||||
mount --bind $targetRoot/ephemeral0/var $targetRoot/var
|
mount --bind $targetRoot/ephemeral0/var $targetRoot/var
|
||||||
|
|
||||||
|
mkdir -p /unionfs-chroot/ro-nix
|
||||||
|
mount --rbind $targetRoot/nix /unionfs-chroot/ro-nix
|
||||||
|
|
||||||
|
mkdir -p /unionfs-chroot/rw-nix
|
||||||
mkdir -m 755 -p $targetRoot/ephemeral0/nix
|
mkdir -m 755 -p $targetRoot/ephemeral0/nix
|
||||||
mount -t aufs -o dirs=$targetRoot/ephemeral0/nix=rw:$targetRoot/nix=rr none $targetRoot/nix
|
mount --rbind $targetRoot/ephemeral0/nix /unionfs-chroot/rw-nix
|
||||||
|
unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot /rw-nix=RW:/ro-nix=RO $targetRoot/nix
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# Since Nova allows VNC access to instances, it's nice to start to
|
# Since Nova allows VNC access to instances, it's nice to start to
|
||||||
|
Loading…
Reference in New Issue
Block a user