Source: {file}modules/services/networking/nordvpn.nix
Upstream documentation: https://github.com/NordSecurity/nordvpn-linux
NordVPN offers a paid virtual private network (VPN) service. The service operates as closed-source, but the Linux client uses open-source code licensed under GPLv3. A minimal configuration in NixOS appears as follows:
{ services.nordvpn.enable = true; networking.firewall.enable = true; networking.firewall.checkReversePath = "loose";}When using a firewall, set networking.firewall.checkReversePath to "loose" or false.
NordVPN includes a kill-switch feature that blocks all packets not associated with the VPN connection.
Additionally, add your user to the nordvpn group.
{ users.users.yourUser = { #.. extraGroups = [ #.. "nordvpn" ]; };}If you prefer to use your own user and group, you can do so using
{ services.nordvpn.user = "SOME-USER"; services.nordvpn.group = "SOME-GROUP";}NordVPN provides several useful CLI commands, including:
nordvpn login # Log in using an OAuth URLnordvpn login --token <token> # Log in with a token obtained from your NordVPN accountnordvpn c # Connect to the VPNnordvpn c ie # Connect to a NordVPN server in Irelandnordvpn d # Disconnect from the VPNnordvpn set technology openvpn # Switch to OpenVPN technologynordvpn c # Reconnect after changing technologyAdditionally, if you prefer to use the friendly GUI,
nordvpn-guiDisclaimer: NixOS currently does not support meshnet. Contributions welcome!