VPN connections use OpenVPN with .ovpn config files downloaded from the NordVPN dashboard. Config files contain server address, CA cert, and TLS key — stored outside the repo at /etc/openvpn/.
Components:
openvpn(profiles/base.nix) — OpenVPN client/etc/openvpn/us11617.nordvpn.com.tcp.ovpn— dedicated IP config (TCP, not in repo, contains secrets)/etc/openvpn/nordvpn-auth.txt— service credentials (not in repo); format: username on line 1, password on line 2
NordVPN provides .ovpn configs for all servers (not just dedicated IPs) via the manual setup section of the dashboard. Service credentials are separate from your account login.
Setup:
- Download a
.ovpnconfig from the NordVPN dashboard sudo mkdir -p /etc/openvpn- Place config at
/etc/openvpn/<name>.ovpnwithsudo chmod 600 - Create
/etc/openvpn/nordvpn-auth.txt(root:root, 600) with service credentials - Update the
auth-user-passline in the.ovpnto point to the auth file:sudo sed -i 's|auth-user-pass|auth-user-pass /etc/openvpn/nordvpn-auth.txt|' /etc/openvpn/<name>.ovpn
Usage:
sudo openvpn --config /etc/openvpn/us11617.nordvpn.com.tcp.ovpnMullvad is managed via services.mullvad-vpn (system daemon) and includes a custom Waybar module (modules/home/desktop/mullvad-waybar.nix).
Waybar module behavior:
- Shows
<exit IP>in green when connected; tooltip shows city, country, and server hostname - Shows
...in yellow while connecting - Hidden when disconnected
- Click to disconnect
Live refresh:
A systemd user service (mullvad-waybar-listener) runs mullvad status listen in the background and sends SIGRTMIN+11 to waybar on each status change, triggering an immediate update rather than waiting for the 30s polling interval.
Local network access:
Mullvad blocks LAN by default — leave it that way. If you need LAN access temporarily:
mullvad lan set allow # enable
mullvad lan set block # re-block when doneNote: Docker port bindings should use 127.0.0.1:PORT:PORT (not PORT:PORT) so dev services stay on loopback and LAN sharing is never needed.