From d629bee9546fa6ed6a018f2b6d491a851ad12738 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 13 Jul 2015 13:39:49 +0200 Subject: "rebase" --- old/modules/lass/iptables/options.nix | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 old/modules/lass/iptables/options.nix (limited to 'old/modules/lass/iptables/options.nix') diff --git a/old/modules/lass/iptables/options.nix b/old/modules/lass/iptables/options.nix new file mode 100644 index 000000000..eb3bfc011 --- /dev/null +++ b/old/modules/lass/iptables/options.nix @@ -0,0 +1,44 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption mkOption types; +in + +{ + enable = mkEnableOption "iptables"; + + #tables.filter.INPUT = { + # policy = "DROP"; + # rules = [ + # { predicate = "-i retiolum"; target = "ACCEPT"; priority = -10; } + # ]; + #}; + #new api + tables = mkOption { + type = with types; attrsOf (attrsOf (submodule ({ + options = { + policy = mkOption { + type = str; + default = "-"; + }; + rules = mkOption { + type = nullOr (listOf (submodule ({ + options = { + predicate = mkOption { + type = str; + }; + target = mkOption { + type = str; + }; + precedence = mkOption { + type = int; + default = 0; + }; + }; + }))); + default = null; + }; + }; + }))); + }; +} -- cgit v1.2.3