anchor.diff:  
         task = true;
   
  +      path = [ pkgs.curl ];
  +
         script =
           ''
  +          curl="curl --retry 3 --retry-delay 0 --fail"
  +        
             echo "setting host name..."
             ${optionalString (config.networking.hostName == "") ''
  -            ${pkgs.nettools}/bin/hostname $(${pkgs.curl}/bin/curl http://169.254.169.254/1.0/meta-data/hostname)
  +            ${pkgs.nettools}/bin/hostname $($curl http://169.254.169.254/1.0/meta-data/hostname)
             ''}
   
             # Don't download the SSH key if it has already been injected
  
positive.code:         '';
      };
  
  }
  
negative.code:           if ! [ -e /root/.ssh/authorized_keys ]; then
                echo "obtaining SSH key..."
                mkdir -p /root/.ssh
                $curl -o /root/key.pub http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key
                if [ $? -eq 0 -a -e /root/key.pub ]; then
                    if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then
                        cat /root/key.pub >> /root/.ssh/authorized_keys
  