mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/firewall: Support extraStopCommands
This commit is contained in:
parent
43c2bc0f8c
commit
6a43d51291
1 changed files with 13 additions and 0 deletions
|
@ -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}
|
||||
ip46tables -D INPUT -j nixos-fw || true
|
||||
${cfg.extraStopCommands}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue