fix hosts file

release
Matthew Salerno 1 year ago
parent ff051d75bf
commit bd9c2b14e5

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

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

Loading…
Cancel
Save