simplified comparison
This commit is contained in:
parent
1d704ccbc8
commit
7e97e91180
1 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,8 @@
|
|||
let
|
||||
# Import nodes
|
||||
nodes = import ./../../nodes.nix;
|
||||
myPeer = nodes."${config.hostName}";
|
||||
myName = config.hostName;
|
||||
myPeer = nodes."${myName}";
|
||||
myId = myPeer.id;
|
||||
myZone = myPeer.zone;
|
||||
|
||||
|
@ -20,7 +21,7 @@ let
|
|||
generatedSecrets = lib.mapAttrsToList (name: node: buildSecret node.zone node.id) nodes;
|
||||
|
||||
# Filter itself out of the peer list
|
||||
peerConfigs = lib.filterAttrs (_peerName: peerConfig: (peerConfig.zone != myZone) || (peerConfig.id != myId)) nodes;
|
||||
peerConfigs = lib.filterAttrs (peerName: _peerConfig: peerName != myName) nodes;
|
||||
|
||||
interfacePeers = lib.mapAttrsToList (peerName: peerConfig: {
|
||||
PublicKey = peerConfig.wg-pub;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue