diff options
author | Matthieu Coudron <mattator@gmail.com> | 2017-10-31 20:14:00 +0900 |
---|---|---|
committer | Matthieu Coudron <mattator@gmail.com> | 2018-02-07 13:21:49 +0900 |
commit | fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e (patch) | |
tree | 3ff95b602076c9944d4f995bf1f7525e360349fe /pkgs/tools/networking/strongswan | |
parent | 11a9e1c3c0b2595ea37b8812736427ffb32a0787 (diff) | |
download | nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar.gz nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar.bz2 nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar.lz nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar.xz nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.tar.zst nixlib-fe4f4de1c92714aa9a2add7ffb3ca83a861d6d4e.zip |
strongswan module: make it work with ipsec l2tp
l2tp saves its secrets into /etc/ipsec.d but strongswan would not read them. l2tp checks for /etc/ipsec.secrets includes /etc/ipsec.d and if not tries to write into it. Solution: Have the strongswan module create /etc/ipsec.d and /etc/ipsec.secrets when networkmanager_l2tp is installed. Include /etc/ipsec.secrets in /nix/store/hash-strongswan/etc/ipsec.secrets so that it can find l2tp secrets. Also when the ppp 'nopeerdns' option is used, the DNS resolver tries to write into an alternate file /etc/ppp/resolv.conf. This fails when /etc/ppp does not exist so the module creates it by default.
Diffstat (limited to 'pkgs/tools/networking/strongswan')
-rw-r--r-- | pkgs/tools/networking/strongswan/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/networking/strongswan/default.nix b/pkgs/tools/networking/strongswan/default.nix index eff498a174eb..7c682704592b 100644 --- a/pkgs/tools/networking/strongswan/default.nix +++ b/pkgs/tools/networking/strongswan/default.nix @@ -76,6 +76,11 @@ stdenv.mkDerivation rec { "--enable-sqlite" ] ++ optional enableNetworkManager "--enable-nm"; + postInstall = '' + # this is needed for l2tp + echo "include /etc/ipsec.secrets" >> $out/etc/ipsec.secrets + ''; + NIX_LDFLAGS = "-lgcc_s" ; meta = { |