Add the possiblity to define extra hosts aliases
nixops generates an /etc/hosts referring to all machines by IP. That'd be usefull, in the case of virtualbox instances at least, to be able to declare extra aliases. Using the following fragment:
machineName.deployment.targetExtraAliases = ["alias1" "alias2"];
would generate the following /etc/hosts on machineName:
127.0.0.1 localhost
::1 localhost
…
192.168.xx.xx machineName machineName-unencrypted alias1 alias2
…
Doing so could relieve users from installing and running a local DNS server for the task.
It's possible to workaround this by doing this:
{
networking.extraHosts = "${nodes."NODE NAME".config.networking.privateIPv4} ALIAS";
}
+1 and a bump for 2021. It would be nice to get this for free.
Actually, to co-opt this a bit, it doesn't seem like nixops is adding the other machines to /etc/hosts at all... is that really supposed to be a feature?