@@ -9,7 +9,7 @@ let
99 # TODO: auto-generate these files using:
1010 # https://github.com/strongswan/strongswan/tree/master/conf
1111 # IDEA: extend the format-options.py script to output these Nix files.
12− strongswanParams = import ./strongswan-params.nix lib;
12+ #strongswanParams = import ./strongswan-params.nix lib;
1313 swanctlParams = import ./swanctl-params.nix lib;
1414in {
1515 options.services.strongswan-swanctl = {
@@ -24,7 +24,18 @@ in {
2424 '';
2525 };
2626
27− strongswan = paramsToOptions strongswanParams;
27+ strongswan.extraConfig = mkOption {
28+ type = types.str;
29+ default = "";
30+ description = ''
31+ Contents of the <literal>strongswan.conf</literal> file.
32+ '';
33+ };
34+
35+ # The structured strongswan configuration is commented out for
36+ # now in favour of the literal config above. We should first
37+ # discus if we want to add the 600+ options by default.
38+ #strongswan = paramsToOptions strongswanParams;
2839 swanctl = paramsToOptions swanctlParams;
2940 };
3041
@@ -65,7 +76,8 @@ in {
6576 path = with pkgs; [ kmod iproute iptables utillinux ];
6677 environment.STRONGSWAN_CONF = pkgs.writeTextFile {
6778 name = "strongswan.conf";
68− text = paramsToConf cfg.strongswan strongswanParams;
79+ #text = paramsToConf cfg.strongswan strongswanParams;
80+ text = cfg.strongswan.extraConfig;
6981 };
7082 restartTriggers = [ config.environment.etc."swanctl/swanctl.conf".source ];
7183 serviceConfig = {