try vpnc script
This commit is contained in:
parent
458f6ff0a4
commit
35b1126a97
1 changed files with 20 additions and 1 deletions
|
|
@ -1,4 +1,20 @@
|
||||||
{ config, ... }: {
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
vpnc = { name, sha256 }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit name;
|
||||||
|
outputHashMode = "recursive";
|
||||||
|
outputHashAlgo = "sha256";
|
||||||
|
outputHash = sha256;
|
||||||
|
builder = writeShellScript "vpnc-script.sh" ''
|
||||||
|
#!/bin/sh
|
||||||
|
export INTERNAL_IP4_DNS=
|
||||||
|
|
||||||
|
. ${pkgs.vpnc-scripts}/vpnc-script
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
sops.secrets.wrwks_vpn_key = {};
|
sops.secrets.wrwks_vpn_key = {};
|
||||||
|
|
||||||
networking.openconnect.interfaces = {
|
networking.openconnect.interfaces = {
|
||||||
|
|
@ -7,6 +23,9 @@
|
||||||
passwordFile = config.sops.secrets.wrwks_vpn_key.path;
|
passwordFile = config.sops.secrets.wrwks_vpn_key.path;
|
||||||
protocol = "anyconnect";
|
protocol = "anyconnect";
|
||||||
user = "exdpolakovics@wrwks.local";
|
user = "exdpolakovics@wrwks.local";
|
||||||
|
extraOptions = {
|
||||||
|
script = "${vpnc}/bin/vpnc-script.sh";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue