From ab2b3a5d0ab682388a39e267705e2f838199b179 Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Wed, 6 Dec 2017 11:17:38 -0500 Subject: [PATCH 1/3] nat: add extraCommands and extraStopCommands options --- nixos/modules/services/networking/nat.nix | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix index bfaf30c1178..df4246d216d 100644 --- a/nixos/modules/services/networking/nat.nix +++ b/nixos/modules/services/networking/nat.nix @@ -19,6 +19,8 @@ let iptables -w -t nat -D POSTROUTING -j nixos-nat-post 2>/dev/null || true iptables -w -t nat -F nixos-nat-post 2>/dev/null || true iptables -w -t nat -X nixos-nat-post 2>/dev/null || true + + ${cfg.extraStopCommands} ''; setupNat = '' @@ -59,6 +61,8 @@ let --to-destination ${cfg.dmzHost} ''} + ${cfg.extraCommands} + # Append our chains to the nat tables iptables -w -t nat -A PREROUTING -j nixos-nat-pre iptables -w -t nat -A POSTROUTING -j nixos-nat-post @@ -170,6 +174,28 @@ in ''; }; + networking.nat.extraCommands = mkOption { + type = types.lines; + default = ""; + example = "iptables -A INPUT -p icmp -j ACCEPT"; + description = + '' + Additional shell commands executed as part of the nat + initialisation script. + ''; + }; + + networking.nat.extraStopCommands = mkOption { + type = types.lines; + default = ""; + example = "iptables -D INPUT -p icmp -j ACCEPT || true"; + description = + '' + Additional shell commands executed as part of the nat + teardown script. + ''; + }; + }; From b222e44f0ac9e2f3ae2a07a0c6f5101216d76d4f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 2 Jan 2018 19:06:21 +0100 Subject: [PATCH 2/3] toot: 0.15.0 -> 0.16.2 --- pkgs/applications/misc/toot/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/toot/default.nix b/pkgs/applications/misc/toot/default.nix index d1b1daa26d6..be865261912 100644 --- a/pkgs/applications/misc/toot/default.nix +++ b/pkgs/applications/misc/toot/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchFromGitHub, pythonPackages }: +{ stdenv, fetchFromGitHub, python3Packages }: -pythonPackages.buildPythonApplication rec { - version = "0.15.0"; +python3Packages.buildPythonApplication rec { + version = "0.16.2"; name = "toot-${version}"; src = fetchFromGitHub { owner = "ihabunek"; repo = "toot"; rev = "${version}"; - sha256 = "08k913gw0ip2q686z9k63bcn1n5s4w6b7jj6jmmamm427xmibkph"; + sha256 = "19n6rmm44y24zvkpk56vd2xmx49sn6wc5qayi1jm83jlnlbbwfh7"; }; - checkInputs = with pythonPackages; [ pytest ]; + checkInputs = with python3Packages; [ pytest ]; - propagatedBuildInputs = with pythonPackages; + propagatedBuildInputs = with python3Packages; [ requests beautifulsoup4 future ]; checkPhase = '' From 9361b7eb85045c7e7dd20d2ddd716a9d10bf4bd4 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Tue, 2 Jan 2018 12:15:16 -0800 Subject: [PATCH 3/3] ghc: bootstrap 8.2.2 with 8.2.1-binary. --- pkgs/top-level/haskell-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index fc4074dd8cd..cba1f9a54a2 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -72,7 +72,7 @@ in rec { sphinx = pkgs.python27Packages.sphinx; }; ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix rec { - bootPkgs = packages.ghc7103Binary; + bootPkgs = packages.ghc821Binary; inherit (bootPkgs) hscolour alex happy; inherit buildPlatform targetPlatform; sphinx = pkgs.python3Packages.sphinx;