Only include ipsecTools if using ipsec

This commit is contained in:
Michael Francis 2021-05-17 21:00:57 +08:00 committed by GitHub
parent 183350a3e1
commit adc368d2fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,9 +66,7 @@ in {
};
in (mkMerge [{
environment.systemPackages = [ cfg.package pkgs.ipsecTools ];
environment.systemPackages = [ cfg.package ];
boot.kernelModules = [ "tun" "openvswitch" ];
boot.extraModulePackages = [ cfg.package ];
@ -146,6 +144,8 @@ in {
}
(mkIf (cfg.ipsec && (versionOlder cfg.package.version "2.6.0")) {
environment.systemPackages = [ pkgs.ipsecTools ];
services.racoon.enable = true;
services.racoon.configPath = "${runDir}/ipsec/etc/racoon/racoon.conf";