Skip to content

Instantly share code, notes, and snippets.

@uskudnik
Forked from cransom/openvpnsnippet.nix
Created May 29, 2018 16:14
Show Gist options
  • Save uskudnik/8d76abf5e58ac2c62884ff58f40de0e1 to your computer and use it in GitHub Desktop.
Save uskudnik/8d76abf5e58ac2c62884ff58f40de0e1 to your computer and use it in GitHub Desktop.
services.openvpn.servers.example = {
config = someconfighere;
autoStart = true;
up = ''
echo nameserver $nameserver | ${pkgs.openresolv}/bin/resolvconf -a $dev
'';
down = ''
echo nameserver $nameserver | ${pkgs.openresolv}/bin/resolvconf -d $dev
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment