mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
fix: add server endpoint to wireguard via clients
This commit is contained in:
parent
6cedaa53e6
commit
7ddb0ee23f
1 changed files with 4 additions and 1 deletions
|
@ -228,9 +228,12 @@
|
||||||
# We are a client node, so only include our via server.
|
# We are a client node, so only include our via server.
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
wireguardPeerConfig = {
|
wireguardPeerConfig = let
|
||||||
|
snCfg = wgCfgOf wgCfg.client.via;
|
||||||
|
in {
|
||||||
PublicKey = builtins.readFile (peerPublicKeyPath wgCfg.client.via);
|
PublicKey = builtins.readFile (peerPublicKeyPath wgCfg.client.via);
|
||||||
PresharedKeyFile = config.rekey.secrets.${peerPresharedKeySecret nodeName wgCfg.client.via}.path;
|
PresharedKeyFile = config.rekey.secrets.${peerPresharedKeySecret nodeName wgCfg.client.via}.path;
|
||||||
|
Endpoint = "${snCfg.server.host}:${toString snCfg.server.port}";
|
||||||
# Access to the whole network is routed through our entry node.
|
# Access to the whole network is routed through our entry node.
|
||||||
# TODO this should add any routedAddresses on ANY server in the network, right?
|
# TODO this should add any routedAddresses on ANY server in the network, right?
|
||||||
# if A entries via B and only C can route 0.0.0.0/0, does that work?
|
# if A entries via B and only C can route 0.0.0.0/0, does that work?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue