From 5b6da895b974c2272374a961d40619fa013a8432 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 23 Sep 2023 18:20:59 -0400 Subject: fix openvpn config? --- home/jon/home.nix | 2 -- programs/openvpn.nix | 28 +++++++++++++++++++++++++++- systems/default.nix | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/home/jon/home.nix b/home/jon/home.nix index a53fdd5..e8c81f7 100644 --- a/home/jon/home.nix +++ b/home/jon/home.nix @@ -16,8 +16,6 @@ in ../../programs/neovim.nix ../../programs/firefox.nix ../../programs/newsboat.nix - - ../../programs/openvpn.nix ]; home.packages = with pkgs; [ diff --git a/programs/openvpn.nix b/programs/openvpn.nix index 5f1c198..e4f396d 100644 --- a/programs/openvpn.nix +++ b/programs/openvpn.nix @@ -3,7 +3,33 @@ services.openvpn = { servers = { MulladVPN-US-Miami = { - config = builtins.readFile ../secrets/mullvad_us_mia/mullvad_us_mia.conf + config = '' +client +dev tun +resolv-retry infinite +nobind +persist-key +persist-tun +verb 3 +remote-cert-tls server +ping 10 +ping-restart 60 +sndbuf 524288 +rcvbuf 524288 +cipher AES-256-GCM +tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 +proto udp +auth-user-pass /etc/nixos/secrets/mullvad_us_mia/mullvad_userpass.txt +ca /etc/nixos/secrets/mullvad_us_mia/mullvad_ca.crt +tun-ipv6 +script-security 2 +up /etc/nixos/secrets/mullvad_us_mia/update-resolv-conf +down /etc/nixos/secrets/mullvad_us_mia/update-resolv-conf +fast-io +remote-random +remote 146.70.187.194 1302 # us-mia-ovpn-101 +remote 146.70.183.66 1302 # us-mia-ovpn-102 + ''; }; }; }; diff --git a/systems/default.nix b/systems/default.nix index 8248e36..f7e968f 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -9,6 +9,7 @@ [ ./${hostname} ../users/jon.nix + ../programs/openvpn.nix ]; boot = { -- cgit v1.2.1