summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--home/jon/home.nix2
-rw-r--r--programs/openvpn.nix28
-rw-r--r--systems/default.nix1
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 = {