modules/wireguard: don't use wg with cache.nixos.org
This commit is contained in:
parent
33cac6a066
commit
d06e1faf3b
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.local.services.vpn.wireguard;
|
cfg = config.local.services.vpn.wireguard;
|
||||||
|
@ -43,6 +43,13 @@ in
|
||||||
# Path to the private key file.
|
# Path to the private key file.
|
||||||
privateKeyFile = cfg.privateKeyFile;
|
privateKeyFile = cfg.privateKeyFile;
|
||||||
|
|
||||||
|
postUp = ''
|
||||||
|
addr=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $3; exit}'`
|
||||||
|
interface=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $5; exit}'`
|
||||||
|
# don't use wg with cache.nixos.org
|
||||||
|
${pkgs.iproute}/bin/ip route add 151.101.86.217/32 via $addr dev $interface
|
||||||
|
'';
|
||||||
|
|
||||||
peers = [
|
peers = [
|
||||||
# For a client configuration, one peer entry for the server will suffice.
|
# For a client configuration, one peer entry for the server will suffice.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue