mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat(guix): final solution to the resolv.conf quiestion. I hope
This commit is contained in:
parent
24665dea14
commit
9028fc3235
3 changed files with 5 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
(specifications->manifest
|
||||
'(
|
||||
"vpnc"
|
||||
"openresolv"
|
||||
"openvpn-update-resolve-conf"
|
||||
"openvpn"
|
||||
"glibc"
|
||||
|
|
|
|||
4
Guix.org
4
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue