diff options
author | tv <tv@krebsco.de> | 2015-06-22 15:24:09 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-06-22 15:24:09 +0200 |
commit | d80f9c1f7efa219f45058771d2ae319b6bfaf7a2 (patch) | |
tree | 273daca78a42d1f8d8ef4bd5ef6ea33598bfc618 /modules/tv/iptables/options.nix | |
parent | e289825b3c658f5310901a6ef6434c17e0122b47 (diff) |
tv: modularize iptables configuration
Diffstat (limited to 'modules/tv/iptables/options.nix')
-rw-r--r-- | modules/tv/iptables/options.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/tv/iptables/options.nix b/modules/tv/iptables/options.nix new file mode 100644 index 0000000..79be1d0 --- /dev/null +++ b/modules/tv/iptables/options.nix @@ -0,0 +1,29 @@ +{ lib, ... }: + +let + inherit (lib) mkOption types; +in + +{ + enable = mkOption { + type = types.bool; + default = false; + description = "Enable iptables."; + }; + + input-internet-accept-new-tcp = mkOption { + type = with types; listOf str; + default = []; + description = '' + ip{4,6}tables -A INPUT -j ACCEPT -p tcp --dport $port -m conntrack --ctstate NEW + ''; + }; + + input-retiolum-accept-new-tcp = mkOption { + type = with types; listOf str; + default = []; + description = '' + ip{4,6}tables -A Retiolum -j ACCEPT -p tcp --dport $port -m conntrack --ctstate NEW + ''; + }; +} |