From 204fa5cf3f0e80dd0556b62c572003b23f724a3c Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 7 Jul 2025 20:00:22 +0100 Subject: [PATCH] doc: added using teh vpn on nix --- src/tutorials/skynet/connect_vpn.md | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/tutorials/skynet/connect_vpn.md b/src/tutorials/skynet/connect_vpn.md index 5ed908e..fe74263 100644 --- a/src/tutorials/skynet/connect_vpn.md +++ b/src/tutorials/skynet/connect_vpn.md @@ -26,3 +26,47 @@ [openfortivpn]: https://github.com/adrienverge/openfortivpn [windows-forticlient]: https://www.fortinet.com/support/product-downloads#vpn + + +## Nix + +For folks who have [nix][nix] installed they can use. +Details on how to use it can be found on the [github]. + +If you have NixOS installed you can use the following module. +It makes use of ``Mome Manager`` to create the config file in ``$USDERNAME``'s home dir. +Using ``vpn up`` and ``vpn down`` to control the vpn. + +```nix +/* +Config for UL VPN. +Opens a small browser to grab the cookie +Use ``vpn up ul`` and ``vpn down ul`` +*/ +{inputs, ...}: { + # https://github.com/NixOS/nixpkgs/issues/231038#issuecomment-1637903456 + environment.etc."ppp/options".text = "ipcp-accept-remote"; + + home-manager.users."$USDERNAME".home = { + file.".vpn".text = '' + [ + { + "name": "ul", + "host": "ulssl.ul.ie", + "port": 443, + "default": true, + "cert": "" + } + ] + ''; + + packages = [ + inputs.openfortivpn-cli.packages.x86_64-linux.default + ]; + }; +} +``` + + +[nix]: ../../skynet/nix.md +[github]: https://github.com/adrienverge/openfortivpn \ No newline at end of file