firewall.nix: Respect networking.enableIPv6 = false

Reported-by: Pablo Costa <modulistic@gmail.com>
This commit is contained in:
Eelco Dolstra 2012-09-18 17:20:46 -04:00
parent 75583c7984
commit d12dd340b6

View file

@ -33,7 +33,9 @@ let
# Helper command to manipulate both the IPv4 and IPv6 tables.
ip46tables() {
iptables "$@"
ip6tables "$@"
${optionalString config.networking.enableIPv6 ''
ip6tables "$@"
''}
}
'';