diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-13 16:38:55 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-13 16:38:55 +0530 |
| commit | e87c356c8104c7c016c41fe477d0654056847343 (patch) | |
| tree | d6d8ccd6348ebd7fbff9d34102a6c2ff92263ec4 /modules/scripts/vpn-connect.sh | |
| parent | 3292982abcfd60c75a1ef3bb1214d91e4ad144aa (diff) | |
| download | home-manager-config-e87c356c8104c7c016c41fe477d0654056847343.tar.gz home-manager-config-e87c356c8104c7c016c41fe477d0654056847343.zip | |
injecting variables into scripts so that they use the actual path of th binaries of the packages
Diffstat (limited to 'modules/scripts/vpn-connect.sh')
| -rw-r--r-- | modules/scripts/vpn-connect.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/scripts/vpn-connect.sh b/modules/scripts/vpn-connect.sh index 0366725..885796a 100644 --- a/modules/scripts/vpn-connect.sh +++ b/modules/scripts/vpn-connect.sh @@ -24,11 +24,10 @@ fi # Selection logic if [[ "$REFRESH" == true ]]; then - # These variables ($FZF_BIN, etc) are provided by the Nix wrapper below - CRED=$(find "$CREDS_DIR" -type f | "$FZF_BIN" --prompt="Select Credentials > ") + CRED=$(find "$CREDS_DIR" -type f | "$FZF" --prompt="Select Credentials > ") [ -z "$CRED" ] && exit 1 - SERVER=$(find "$SERVERS_DIR" -type f \( -name "*.conf" -o -name "*.ovpn" \) | "$FZF_BIN" --prompt="Select VPN Server > ") + SERVER=$(find "$SERVERS_DIR" -type f \( -name "*.conf" -o -name "*.ovpn" \) | "$FZF" --prompt="Select VPN Server > ") [ -z "$SERVER" ] && exit 1 echo "CRED=\"$CRED\"" > "$CACHE_FILE" @@ -49,10 +48,10 @@ sed -e '/up \/etc\/openvpn\/update-resolv-conf/d' \ trap 'rm -f "$TMP_CONF"' EXIT # Execute openvpn using the temporary file -sudo "$OPENVPN_BIN" \ +sudo "$OPENVPN" \ --config "$TMP_CONF" \ --auth-user-pass "$CRED" \ --script-security 2 \ - --up "$RESOLVED_BIN" \ - --down "$RESOLVED_BIN" \ + --up "$SYSTEMD_RESOLVED" \ + --down "$SYSTEMD_RESOLVED" \ --down-pre |
