diff --git a/modules/services/default.nix b/modules/services/default.nix index 142c6f2..14fa952 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -9,6 +9,7 @@ ./keyring.nix ./openvpn.nix ./picom.nix + ./openconnect.nix ]; services = { diff --git a/modules/services/openconnect.nix b/modules/services/openconnect.nix new file mode 100644 index 0000000..b48bea4 --- /dev/null +++ b/modules/services/openconnect.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +{ + networking.openconnect.interfaces = { + university = { + gateway = "vpn.uni-leipzig.de"; + protocol = "anyconnect"; + user = "mb18cele@uni-leipzig.de"; + # NOTE file content as follows: + # + # "1-Standard-Uni" or "2-Spezial-Alles" + # Explanation: + # 1-Standard-Uni = Uni Dienste über VPN (Standard) + # 2-Spezial-Alles = Gesamter Datenverkehr über VPN (Spezial) + passwordFile = "/run/agenix/uniVPN"; + }; + }; + age.secrets.uniVPN = { + file = ../../secrets/uni-vpn.age; + owner = "1000"; + }; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index ff24b3f..cde883f 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -18,4 +18,5 @@ in { "home-vpn.age".publicKeys = users ++ hosts; "home-vpn-password.age".publicKeys = users ++ hosts; "github.age".publicKeys = users ++ hosts; + "uni-vpn.age".publicKeys = users ++ hosts; } diff --git a/secrets/uni-vpn.age b/secrets/uni-vpn.age new file mode 100644 index 0000000..990d96c Binary files /dev/null and b/secrets/uni-vpn.age differ