Open justinas opened 3 years ago
For those looking for a possible workaround:
{ config, lib, nodes, ... }:
{
networking.extraHosts = with lib; concatStringsSep "\n"
(mapAttrsToList (n: v: "${v} ${n}")
(filterAttrs (n: v: n != config.networking.hostName)
(mapAttrs (n: v: v.config.networking.privateIPv4) nodes)));
}
does what I want it to.
This is also not working for me using the AWS backend.
It is mentioned under VirtualBox section, back from when that backend existed in-tree. Am I wrong in assuming this should work for the "none" backend, i.e. deploying to an existing machine using
deployment.targetHost
?
FTR this is currently failing to work with virtualbox backend too. 😕
Was the feature removed?
Using NixOps master faed0635d24e93f38046af58fb7715327de28e39.
An older NixOps manual mentions:
It is mentioned under VirtualBox section, back from when that backend existed in-tree. Am I wrong in assuming this should work for the "none" backend, i.e. deploying to an existing machine using
deployment.targetHost
?Here's my problem: I define a network:
I then proceed with
nixops deploy
and/etc/hosts
for each host contains only its own hostname.nixops show-physical
shows this:So, it picks up
networking.publicIPv4
from the definition, but notprivateIPv4
. The option is still present in the manual, but I am not sure why it is not picked up.I am not too familiar with the codebase, but this seems like it could be relevant: https://github.com/NixOS/nixops/blob/8de09879d7b1733bc4085257d5bf3cc734f1ed38/nixops/backends/__init__.py#L451-L453