anchor.diff:              ''
                 mkdir $out
                 diskImage=$out/$diskImageBase
  -              truncate $diskImage --size 10G
  +              truncate $diskImage --size ${diskSize}
                 mv closure xchg/
               '';
   
  
positive.code:             ''
                PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
                pushd $out
                tar -Szcf $diskImageBase.tar.gz $diskImageBase
                rm $out/$diskImageBase
                popd
              '';
            diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
  
negative.code:         ''
            # Create partition table
            ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
            ${pkgs.parted}/sbin/parted /dev/vda mkpart primary ext4 1 ${diskSize}
            ${pkgs.parted}/sbin/parted /dev/vda print
            . /sys/class/block/vda1/uevent
            mknod /dev/vda1 b $MAJOR $MINOR
  