Fetch work VPN passwords from password-store, pass to openfortivpn

This commit is contained in:
Evie Litherland-Smith 2024-09-18 10:25:59 +01:00
parent 597cbe82ee
commit 0b8ca9ea5a

View file

@ -1,7 +1,11 @@
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}")
(pkgs.writeShellScriptBin "jetdata-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./jetdata-vpn.conf}")
(pkgs.writeShellScriptBin "ukaea-vpn-connect" ''
sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf} -p $(${pkgs.pass}/bin/pass show work/microsoftonline.com | head -n1)
'')
(pkgs.writeShellScriptBin "jetdata-vpn-connect" ''
sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./jetdata-vpn.conf} -p $(${pkgs.pass}/bin/pass show work/microsoftonline.com | head -n1)
'')
];
}