Mullvad, impermanence and RPC socket path errors; how do I reset a package?

Hi everyone,

I have a NixOS setup with a zfs root that rolls back to blank on boot. This works fine, however mullvad is causing some headache for me. I have services.mullvad-vpn.enable = true; and I added /etc/mullvad-vpn as a persistent dir, but the service still fails on each boot and require me to run mullvad disconnect > mullvad relay update > mullvad connect. This is tedious, so in an attempt to solve this I then set all mullvad related variables I could find to a persistent location, in particular:

MULLVAD_RPC_SOCKET_PATH
MULLVAD_CACHE_DIR
MULLVAD_LOG_DIR

This has made mullvad unusable. It fails on boot, and all mullvad commands - including the mullvad factory-reset return:

Error: Management interface error
Caused by: Management RPC server or client error
Caused by: transport error
Caused by: error trying to connect: No such file or directory (os error 2)
Caused by: No such file or directory (os error 2)

I do not know how to solve this. I have tried reverting the variables to their default, disabling mullvad in nixos-config and running nix-collect-garbage -d (on the assumption that this would remove all traces of mullvad and reset the package, is this incorrect?), but the error still persist when I re-enable mullvad.

I would like to find a solution which allow mullvad to connect on its own on boot, but at this point I would take being able to establish a manual connection.

1 Like

I found this in a Github discussion and it worked…

Mullvad VPN Settings

networking.firewall.checkReversePath = “loose”;
networking.wireguard.enable = true;
services.mullvad-vpn.enable = true;

1 Like

Unfortunately it does not solve it.

1 Like