nixos/firewall: Support extraStopCommands

This commit is contained in:
William A. Kennington III 2014-09-15 21:29:46 -07:00
parent 43c2bc0f8c
commit 6a43d51291

View File

@ -240,6 +240,18 @@ in
''; '';
}; };
networking.firewall.extraStopCommands = mkOption {
type = types.lines;
default = "";
example = "iptables -P INPUT ACCEPT";
description =
''
Additional shell commands executed as part of the firewall
shutdown script. These are executed just after the removal
of the nixos input rule.
'';
};
}; };
@ -432,6 +444,7 @@ in
'' ''
${helpers} ${helpers}
ip46tables -D INPUT -j nixos-fw || true ip46tables -D INPUT -j nixos-fw || true
${cfg.extraStopCommands}
''; '';
}; };