From 02eb997d3e068753920b3e78d6f48889f77bda54 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Oct 2015 19:40:00 +0200 Subject: lass 2 configs: add privoxy configs lass 2: retiolum_privoxy -> privoxy-retiolum --- lass/2configs/privoxy-retiolum.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lass/2configs/privoxy-retiolum.nix (limited to 'lass/2configs/privoxy-retiolum.nix') diff --git a/lass/2configs/privoxy-retiolum.nix b/lass/2configs/privoxy-retiolum.nix new file mode 100644 index 00000000..3a3641ad --- /dev/null +++ b/lass/2configs/privoxy-retiolum.nix @@ -0,0 +1,21 @@ +{ config, lib, ... }: + +let + r_ip = (head config.krebs.build.host.nets.retiolum.addrs4); + inherit (lib) head; + +in { + imports = [ + ./privoxy.nix + ]; + + services.privoxy.listenAddress = "${r_ip}:8118"; + + krebs.iptables = { + tables = { + filter.INPUT.rules = [ + { predicate = "-i retiolum -p tcp --dport 8118"; target = "ACCEPT"; } + ]; + }; + }; +} -- cgit v1.2.3