{ pkgs, hyper, secrets, ... }: 
pkgs.lib.mkIf (hyper.host != "NxACE")
{
  home.packages = [
    pkgs.remmina
    pkgs.openvpn

    (pkgs.writeShellScriptBin "connect_to_pnx" ''
      pushd ~/.vpn/
      sudo openvpn --config ${hyper.home}/.vpn/ljk-pnx.ovpn --auth-user-pass ~/.vpn/ljk-pnx-pass.txt #gets put there by home-manager
      popd
    '')

  ];
  
  home.file = {

    ".vpn/ljk-pnx-cert.pem".text = secrets.pnxVpn.cert;
    ".vpn/ljk-pnx-cert.key".text = secrets.pnxVpn.certKey;
    ".vpn/ljk-pnx-ca.pem".text = secrets.pnxVpn.ca;
    ".vpn/ljk-pnx.ovpn".text = secrets.pnxVpn.ovpn;
    ".vpn/ljk-pnx-pass.txt".text = secrets.pnxVpn.pass;

    # Remmina
    ".local/share/remmina/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina".source = ./assets/pnx/pnx_rdp_srv-phoe3-vmdms_192-168-1-104.remmina;
    ".local/share/remmina/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina".source = ./assets/pnx/pnx_rdp_srv-phoenix-3_192-168-1-108.remmina;
    ".local/share/remmina/pnx_rdp_srv-phoenix2_192-168-1-101.remmina".source = ./assets/pnx/pnx_rdp_srv-phoenix2_192-168-1-101.remmina;
    ".local/share/remmina/pnx_rdp_srv-remote_192-168-1-21.remmina".source = ./assets/pnx/pnx_rdp_srv-remote_192-168-1-21.remmina;
  };
}
