ProtonVPN - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Sridhar Ratnakumar

Could anyone that uses ProtonVPN on NixOS share their config?

Will

as of right now, I just have the cli tool installed as a package, and connect manually when I log in: https://github.com/wbadart/dotfiles/blob/master/hosts/nixos/home.nix#L15

I've tried to adapt the connect on boot documentation to a home-manager user service, but so far, the unit always fails (https://github.com/wbadart/dotfiles/blob/master/hosts/nixos/home.nix#L59-L74)

Just my dotfiles and a couple handy shell scripts. Contribute to wbadart/dotfiles development by creating an account on GitHub.
Linux command-line client for ProtonVPN. Written in Python. - ProtonVPN/linux-cli
Just my dotfiles and a couple handy shell scripts. Contribute to wbadart/dotfiles development by creating an account on GitHub.
Sridhar Ratnakumar

Thanks. Would be cool to wrap this as a systemd service, with a tray icon! :smile:

Will

if you're using gnome, i've had decent success with https://extensions.gnome.org/extension/3133/protonvpn-status/ in the past. works well as a status icon, though the controls (connect/disconnect buttons, etc) seem buggy. i've since moved on to xmonad though

Sridhar Ratnakumar

Great. Works with this:

{
  environment.systemPackages = with pkgs; [
    protonvpn-cli
  ];

  security.sudo.extraRules = [
    { users = [ "srid" ];
      commands = [
        { command = "${pkgs.protonvpn-cli}/bin/protonvpn";
          options = [ "NOPASSWD" ];
        }
      ];
    }
  ];
}