From 9028fc32356e6874709bbff1883176fa9f2ae682 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sat, 9 Apr 2022 12:20:05 +0300 Subject: [PATCH] feat(guix): final solution to the resolv.conf quiestion. I hope --- .config/guix/manifests/system.scm | 1 + Guix.org | 4 ++-- bin/scripts/vpn-fix-routes | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/guix/manifests/system.scm b/.config/guix/manifests/system.scm index db5d6aa..7037993 100644 --- a/.config/guix/manifests/system.scm +++ b/.config/guix/manifests/system.scm @@ -2,6 +2,7 @@ (specifications->manifest '( "vpnc" + "openresolv" "openvpn-update-resolve-conf" "openvpn" "glibc" diff --git a/Guix.org b/Guix.org index ecccc3b..4058948 100644 --- a/Guix.org +++ b/Guix.org @@ -543,6 +543,7 @@ Don't forget to install =JetBrainsMono Nerd Font=. |----------+-----------------------------| | system | openvpn | | system | openvpn-update-resolve-conf | +| system | openresolv | | system | vpnc | I'm not sure how to properly spin up VPN on Guix, so here is what ended I'm doing after some trial and error. @@ -583,8 +584,7 @@ I'm using CyberGhost VPN. =~/.vpn= folder stores its OpenVPN config (=openvpn.ov Restore =resolv.conf= #+begin_src sh :tangle ~/bin/scripts/restore-resolve-conf - cp /etc/resolv.conf-bak /etc/resolv.conf - rm /etc/resolv.conf-bak + resolveconf -u #+end_src #+begin_src conf-space :tangle no diff --git a/bin/scripts/vpn-fix-routes b/bin/scripts/vpn-fix-routes index 9527a4a..7a4cd86 100755 --- a/bin/scripts/vpn-fix-routes +++ b/bin/scripts/vpn-fix-routes @@ -1,5 +1,5 @@ #!/bin/sh -# [[file:../../Guix.org::*VPN][VPN:6]] +# [[file:../../Guix.org::*VPN][VPN:9]] echo "Adding default route to $route_vpn_gateway with /0 mask..." IP=/run/current-system/profile/sbin/ip @@ -9,4 +9,4 @@ $IP route add default via $route_vpn_gateway echo "Removing /1 routes..." $IP route del 0.0.0.0/1 via $route_vpn_gateway $IP route del 128.0.0.0/1 via $route_vpn_gateway -# VPN:6 ends here +# VPN:9 ends here