anchor.diff:              mkdir -m 1777 -p $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
               mount --bind $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
   
  -            if [ ! -e $targetRoot/.ebs ]; then
  +            if [ "$(cat "$metaDir/ami-manifest-path")" != "(unknown)" ]; then
                   mkdir -m 755 -p $targetRoot/$diskForUnionfs/root/var $targetRoot/var
                   mount --bind $targetRoot/$diskForUnionfs/root/var $targetRoot/var
   
  
positive.code:     # Nix operations.
      boot.initrd.postMountCommands =
        ''
          diskNr=0
          diskForUnionfs=
          for device in /dev/xvd[abcde]*; do
  
negative.code: 
  with lib;
  
  let
  
    cfg = config.ec2;
  
    udhcpcScript = pkgs.writeScript "udhcp-script"
      ''
        #! /bin/sh
        if [ "$1" = bound ]; then
          ip address add "$ip/$mask" dev "$interface"
          if [ -n "$router" ]; then
            ip route add default via "$router" dev "$interface"
          fi
          if [ -n "$dns" ]; then
            rm -f /etc/resolv.conf
            for i in $dns; do
              echo "nameserver $dns" >> /etc/resolv.conf
            done
          fi
        fi
      '';
  
  in
  
  {
    imports = [ ../profiles/headless.nix ./ec2-data.nix ./amazon-grow-partition.nix ./amazon-init.nix ];
  