anchor.diff:  with pkgs.lib;
   
   let
  +  inherit (import ./ssh-keys.nix pkgs)
  +    snakeOilPrivateKey snakeOilPublicKey;
  +
     metadataDrive = pkgs.stdenv.mkDerivation {
       name = "metadata";
       buildCommand = ''
  
positive.code:   meta = with pkgs.stdenv.lib.maintainers; {
      maintainers = [ lewo ];
    };
    machine =
      { ... }:
      {
        virtualisation.qemu.options = [ "-cdrom" "${metadataDrive}/metadata.iso" ];
        services.cloud-init.enable = true;
      };
    testScript = ''
        machine.start()
        machine.wait_for_unit("cloud-init.service")
        machine.succeed("cat /tmp/cloudinit-write-file | grep -q 'cloudinit'")
  
        machine.wait_until_succeeds("cat /root/.ssh/authorized_keys | grep -q root@test")
    '';
  }
  
negative.code:       -   content: |
                  cloudinit
            path: /tmp/cloudinit-write-file
  
        users:
          - default
          - name: nixos
            ssh_authorized_keys:
              - "${snakeOilPublicKey}"
        EOF
  
        cat << EOF > $out/iso/meta-data
        instance-id: iid-local01
        local-hostname: "test"
        public-keys:
          - "${snakeOilPublicKey}"
        EOF
        ${pkgs.cdrkit}/bin/genisoimage -volid cidata -joliet -rock -o $out/metadata.iso $out/iso
        '';
  