Hello,
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 = "test2.example.net";
};
}
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 git.example.net
, www.example.net
, ssh.example.net
…