nixos/firewall: Support extraStopCommands
This commit is contained in:
parent
43c2bc0f8c
commit
6a43d51291
@ -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}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user