add peers to host file

release
Matthew Salerno 1 year ago
parent 1e6027dde9
commit 788e783ae2

@ -18,6 +18,9 @@ let
in
with getKeyProviderFuncs keyProviders inputs intermediateConfig peerName;
{
networking.extraHosts = concatStringsSep "\n" (concatLists (forEachAttrToList thisPeer.subnetConnections (subnetName: subnetConnection:
forEachAttrToList subnetConnection.peerConnections (otherPeerName: peerConnection: "${peerConnection.endpoint.ip} ${peerName}.${subnetName}")
)));
systemd.network = {
netdevs = forEachAttr' thisPeer.subnetConnections (subnetName: subnetConnection: nameValuePair "50-wn-${subnetName}" {
netdevConfig = {

@ -18,6 +18,9 @@ let
in
with getKeyProviderFuncs keyProviders inputs intermediateConfig peerName;
{
networking.extraHosts = concatStringsSep "\n" (concatLists (forEachAttrToList thisPeer.subnetConnections (subnetName: subnetConnection:
(forEachAttrToList subnetConnection.peerConnections (otherPeerName: peerConnection: "${peerConnection.endpoint.ip} ${peerName}.${subnetName}"))
)));
networking.wireguard = {
interfaces = forEachAttr' thisPeer.subnetConnections (subnetName: subnetConnection: nameValuePair "wn-${subnetName}"
{

Loading…
Cancel
Save