summary refs log tree commit diff
path: root/nixos/modules/services/networking/firewall.nix
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-09-15 21:29:46 -0700
committerWilliam A. Kennington III <william@wkennington.com>2014-09-15 21:31:26 -0700
commit6a43d512918e6449cb55fd10cdf7baf634e0ed87 (patch)
tree6ee3ef1f8247e6fe7fbbb3b932b11ee8eb050bc0 /nixos/modules/services/networking/firewall.nix
parent43c2bc0f8c0f50eca0b0e47820ee503c14b4b152 (diff)
downloadnixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar.gz
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar.bz2
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar.lz
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar.xz
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.tar.zst
nixpkgs-6a43d512918e6449cb55fd10cdf7baf634e0ed87.zip
nixos/firewall: Support extraStopCommands
Diffstat (limited to 'nixos/modules/services/networking/firewall.nix')
-rw-r--r--nixos/modules/services/networking/firewall.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index b97ec8b4d43..eaf48b9c6e5 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -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}
           '';
       };