From 80430d5aaa9ebccdd94df5cef73a1c76a47f7ea4 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 5 Aug 2024 13:54:37 +0100 Subject: [PATCH] Move VPN config location, add JDC VPN config --- home/openfortivpn/jetdata-vpn.conf | 5 +++++ home/{scripts => openfortivpn}/ukaea-vpn.conf | 2 ++ home/openfortivpn/ukaea.nix | 7 +++++++ home/scripts/ukaea-vpn.nix | 2 -- home/work.nix | 8 ++++---- 5 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 home/openfortivpn/jetdata-vpn.conf rename home/{scripts => openfortivpn}/ukaea-vpn.conf (65%) create mode 100644 home/openfortivpn/ukaea.nix delete mode 100644 home/scripts/ukaea-vpn.nix diff --git a/home/openfortivpn/jetdata-vpn.conf b/home/openfortivpn/jetdata-vpn.conf new file mode 100644 index 00000000..f8bc4f91 --- /dev/null +++ b/home/openfortivpn/jetdata-vpn.conf @@ -0,0 +1,5 @@ +host = vpn.jetdata.eu +port = 943 +username = elitherl +set-dns = 0 +set-routes = 0 diff --git a/home/scripts/ukaea-vpn.conf b/home/openfortivpn/ukaea-vpn.conf similarity index 65% rename from home/scripts/ukaea-vpn.conf rename to home/openfortivpn/ukaea-vpn.conf index 64386fe6..c9a08eaf 100644 --- a/home/scripts/ukaea-vpn.conf +++ b/home/openfortivpn/ukaea-vpn.conf @@ -1,3 +1,5 @@ host = vpn.ukaea.uk port = 943 username = elitherl +set-dns = 1 +set-routes = 1 diff --git a/home/openfortivpn/ukaea.nix b/home/openfortivpn/ukaea.nix new file mode 100644 index 00000000..c2acbb39 --- /dev/null +++ b/home/openfortivpn/ukaea.nix @@ -0,0 +1,7 @@ +{ 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}") + ]; +} diff --git a/home/scripts/ukaea-vpn.nix b/home/scripts/ukaea-vpn.nix deleted file mode 100644 index aab811bc..00000000 --- a/home/scripts/ukaea-vpn.nix +++ /dev/null @@ -1,2 +0,0 @@ -pkgs: -(pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}") diff --git a/home/work.nix b/home/work.nix index 09d312e2..964ab30b 100644 --- a/home/work.nix +++ b/home/work.nix @@ -5,11 +5,11 @@ ... }: { - imports = [ ./default.nix ]; - home.packages = [ - pkgs.twinkle - (import ./scripts/ukaea-vpn.nix pkgs) + imports = [ + ./default.nix + ./openfortivpn/ukaea.nix ]; + home.packages = [ pkgs.twinkle ]; programs.git.userEmail = config.accounts.email.accounts.outlook.address; accounts.email.accounts = { proton.primary = lib.mkForce false;