diff --git a/keys/wg.mullvad-nl4.key b/keys/wg.mullvad-nl4.key new file mode 100644 index 0000000..6ff1d02 Binary files /dev/null and b/keys/wg.mullvad-nl4.key differ diff --git a/logical/frumar.nix b/logical/frumar.nix index f18cbce..f1bf12b 100644 --- a/logical/frumar.nix +++ b/logical/frumar.nix @@ -18,7 +18,7 @@ }; boot.supportedFilesystems = [ "zfs" ]; services.yorick.torrent-vpn = { - enable = true; name = "mullvad-nl3"; namespace = "torrent"; + enable = true; name = "mullvad-nl4"; namespace = "torrent"; }; services.plex = { enable = true; diff --git a/services/torrent-wg.nix b/services/torrent-wg.nix index fca2c77..598d986 100644 --- a/services/torrent-wg.nix +++ b/services/torrent-wg.nix @@ -1,4 +1,4 @@ -{lib, config, ...}: +{pkgs, lib, config, ...}: let cfg = config.services.yorick.torrent-vpn; in @@ -12,21 +12,16 @@ in deployment.keyys = [ (+"/wg.${cfg.name}.key") ]; networking.wireguard.interfaces.${cfg.name} = { # curl -s https://api.mullvad.net/www/relays/all/ | jq '.[] | select(.type == "wireguard" and .country_code == "nl")' - ips = ["10.64.19.76/32" "fc00:bbbb:bbbb:bb01::1:134b/128"]; + ips = [ "10.66.30.26/32" "fc00:bbbb:bbbb:bb01::3:1e19/128" ]; privateKeyFile = "/root/keys/wg.${cfg.name}.key"; peers = [{ publicKey = "hnRyse6QxPPcZOoSwRsHUtK1W+APWXnIoaDTmH6JsHQ="; allowedIPs = ["0.0.0.0/0" "::0/0"]; - endpoint = "185.65.134.224:31173"; + endpoint = "[2a03:1b20:3:f011::a04f]:51820"; }]; interfaceNamespace = cfg.namespace; - }; - systemd.services."wireguard-${cfg.name}" = { - preStart = '' - ip netns add "${cfg.namespace}" - ''; - postStop = '' - ip netns del "${cfg.namespace}" + preSetup = '' + ${pkgs.iproute}/bin/ip netns add "${cfg.namespace}" || true ''; }; environment.etc."netns/torrent/resolv.conf".text = ''