diff --git a/nixos/services/torrent-wg.nix b/nixos/services/torrent-wg.nix index b15c800..87af0c0 100644 --- a/nixos/services/torrent-wg.nix +++ b/nixos/services/torrent-wg.nix @@ -1,20 +1,5 @@ { pkgs, lib, config, ... }: let cfg = config.services.yorick.torrent-vpn; - # curl -s 'https://api.mullvad.net/www/relays/all/' | jq '.[] | select(.type == "wireguard" and .country_code == "nl" and .owned and .active) | {hostname, pubkey, ipv4_addr_in, ipv6_addr_in}' - mullvad_entry = builtins.fromJSON '' - { - "hostname": "nl-ams-wg-006", - "pubkey": "xpZ3ZDEukbqKQvdHwaqKMUhsYhcYD3uLPUh1ACsVr1s=", - "ipv4_addr_in": "185.65.134.86", - "ipv6_addr_in": "2a03:1b20:3:f011::a06f", - "status_messages": [ - { - "message": "OpenVPN servers hosted by 31173 will be upgraded to a newer OS and some will upgrade to 20Gbps from 10Gbps. the upgrades will begin from 2023-MAR-23, we will rotate IP-addresses and also change their hostnames to use the new naming scheme, This will also affect WG Servers in AMS.", - "timestamp": "2023-03-23T16:25:13+00:00" - } - ] - } - ''; in { options.services.yorick.torrent-vpn = with lib; { enable = mkEnableOption "torrent-vpn"; @@ -24,12 +9,12 @@ in { config = lib.mkIf cfg.enable { age.secrets.wg-torrent.file = ../../secrets/wg.${cfg.name}.age; networking.wireguard.interfaces.${cfg.name} = { - ips = [ "10.66.30.26/32" "fc00:bbbb:bbbb:bb01::3:1e19/128" ]; + ips = [ "10.0.34.127/32" "2a0e:1c80:1337:1:10:0:34:127/128" ]; privateKeyFile = config.age.secrets.wg-torrent.path; peers = [{ - publicKey = mullvad_entry.pubkey; + publicKey = "W+LE+uFRyMRdYFCf7Jw0OPERNd1bcIm0gTKf/traIUk="; allowedIPs = [ "0.0.0.0/0" "::0/0" ]; - endpoint = "[${mullvad_entry.ipv6_addr_in}]:51820"; + endpoint = "nl-ams.azirevpn.net:51820"; }]; interfaceNamespace = cfg.namespace; preSetup = '' @@ -37,7 +22,9 @@ in { ''; }; environment.etc."netns/torrent/resolv.conf".text = '' - nameserver 10.64.0.1 + nameserver 91.231.153.2 + nameserver 192.211.0.2 + nameserver 2a0e:1c80:1337:1:10:0:0:1 ''; }; } diff --git a/secrets/wg.mullvad-nl4.age b/secrets/wg.mullvad-nl4.age index 732386f..ccc4279 100644 --- a/secrets/wg.mullvad-nl4.age +++ b/secrets/wg.mullvad-nl4.age @@ -1,9 +1,9 @@ age-encryption.org/v1 --> X25519 NTsP3q16FXw495kyGhtRnco4N3h5VnIL5qZ6JR9Dy3A -hj3JRnBAyWU8QE25X0cl4zoCEev2CLvhITyodD1W8Kk --> ssh-ed25519 n7yA6g iZFg1SYroHcuo3veVzb6YLrgk79Gg+45XFGfV1ng5GE -cdPpCckJ22HTQjizXonDn9v/UoJ4S1+WZYuQu/JGiv0 --> P$su5bq-grease 7 9Gn -8DedklaheXSXhs36n7T1gQd5Eqf5ieyuckmWe7xn ---- AmZDmt8dsARrK5q14TmD63QUtYNpbqwbc5Daty3yYE0 -,eT¥šã ©¨X™<GXËr £k3&\H®‡L“ªº"41 kÕsvîdU$,V²Õ§W{†TþE^ uÖÓñ½€Ð cÛqë \ No newline at end of file +-> X25519 xgWxbSlMQrR8Zeb/rtECbkcQXLhfC6y6O1uF0sHJ6kM +qVO8RGnm8tIM39Fc3TxB9J9YjU9QprZj1ZO+P5CceYM +-> ssh-ed25519 n7yA6g JaOXDU4p9cZGdT4+KZEhLW34AxR6BdVWVINJYhADtic +artz9dezRBYSXnt1HtQXwNoa/5//I9p6xez4ldrHWNg +-> ii9$I-grease +0hWmT/UxD7QdvWD5gHV54l1QUrs53yDCqNBIZOTSKZpHh0U +--- xzYpgG9HoVn4rNUn5CzkEeKxdAh9J4T5yqQG+GbDHaA +€gcÐݽ‡ìN®Æ£gWÌ +$«t$þå¬Æàœ€‡ sè()©zÖ:úàve A|4¨î}ãuâPÔY8 i<²ñc“ \ No newline at end of file