Nixos:(several) hostnames in VM


I’m trying to test my server setting locally using VM, so I tried to generate a small VM as follow (I just use the one provided in man nixos-rebuild-vms, and kept only the second entry):

  test2 = {pkgs, config, ...}:
      services.openssh.enable = true;
      services.httpd.enable = true;
      environment.systemPackages = [ pkgs.lynx ];
      nixpkgs.localSystem.system = "x86_64-linux";
      deployment.targetHost = "";

but it does not compile:

$ nixos-build-vms network.nix 
error: --- ThrownError --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
The option `deployment' defined in `<unknown-file>' does not exist.
(use '--show-trace' to show detailed location information)

Any idea how I could give a hostname to the VM? Ideally I’d like to setup multiple hostnames for one VM, like,,