aboutsummaryrefslogtreecommitdiff
path: root/apps/strongswan/options/setup.nix
diff options
context:
space:
mode:
Diffstat (limited to 'apps/strongswan/options/setup.nix')
-rw-r--r--apps/strongswan/options/setup.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/strongswan/options/setup.nix b/apps/strongswan/options/setup.nix
new file mode 100644
index 0000000..d60a2af
--- /dev/null
+++ b/apps/strongswan/options/setup.nix
@@ -0,0 +1,24 @@
+{ config, lib, ... }:
+
+let
+
+ inherit (lib) foldl genAttrs;
+ inherit (import ./lib.nix lib) boolean boolOr default optional set enum';
+
+ charondebug = genAttrs [
+ "asn" "cfg" "chd" "dmn"
+ "enc" "esp" "ike" "imc"
+ "imv" "job" "knl" "lib"
+ "mgr" "net" "pts" "tls"
+ "tnc"
+ ] (_: optional (enum' [ (-1) 0 1 2 3 4 ]));
+
+in {
+ options = foldl (a: b: a//b) {} [
+ { cachecrls = optional boolean; }
+ { charondebug = set charondebug; }
+ { charonstart = optional boolean; }
+ { strictcrlpolicy = optional (boolOr [ "ifuri" ]); }
+ { uniqueids = optional (boolOr [ "never" "replace" "keep" ]); }
+ ];
+}