Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Last active October 30, 2017 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinlacewell-wk/e769c5a1b83dce78b732e5d3b7b93fd7 to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/e769c5a1b83dce78b732e5d3b7b93fd7 to your computer and use it in GitHub Desktop.
{ config, pkgs, lib, ... }:
let
plugins = import <plugins>;
udp = { host, port ? 1194 }: { host = host; port = port; type = "udp"; };
tcp = { host, port ? 443 }: { host = host; port = port; type = "tcp-client"; };
in {
imports = [ plugins.viscosity ];
home.file."${credPath}/ca.crt".text = builtins.getEnv "WORKIVA_VPN_CA";
home.file."${credPath}/cert.crt".text = builtins.getEnv "WORKIVA_VPN_CERT";
home.file."${credPath}/key.key".text = builtins.getEnv "WORKIVA_VPN_KEY";
home.file."${credPath}/ta.key".text = builtins.getEnv "WORKIVA_VPN_TA";
programs.viscosity = {
enable = true;
connections = {
"Harbour Demo" = [udp {host="example.com";}];
"Harbour Pentest" = [udp {host="example.com";}];
"Harbour Sandbox" = [udp {host="example.com";}];
"Harbour Production" = [udp {host="example.com";}];
"Harbour EU" = [udp {host="example.com";}];
"Harbour Inf-Dev" = [udp {host="example.com";}];
"Harbour Inf-Tools" = [udp {host="example.com";}];
"Harbour Wk-Dev" = [udp {host="example.com";}];
"Corporate" = [
tcp { host = "example.com"; }
tcp { host = "example.com"; }
udp { host = "example.com"; port = 1196; }
udp { host = "example.com"; port = 1196; }
];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment