lass 2 configs: add privoxy configs

lass 2: retiolum_privoxy -> privoxy-retiolum
This commit is contained in:
lassulus 2015-10-03 19:40:00 +02:00
parent eff469ebef
commit 02eb997d3e
4 changed files with 38 additions and 0 deletions

View File

@ -14,6 +14,7 @@ in {
../2configs/retiolum.nix
../2configs/fastpoke-pages.nix
../2configs/new-repos.nix
../2configs/privoxy-retiolum.nix
{
networking.interfaces.enp2s1.ip4 = [
{

View File

@ -23,6 +23,7 @@
../2configs/wordpress.nix
../2configs/bitlbee.nix
../2configs/firefoxPatched.nix
../2configs/wallpaper.nix
];
krebs.build = {

View File

@ -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"; }
];
};
};
}

15
lass/2configs/privoxy.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, ... }:
{
services.privoxy = {
enable = true;
extraConfig = ''
#use polipo
forward / localhost:8123
#route .onion through tor
forward-socks4a .onion localhost:9050
'';
};
services.polipo.enable = true;
}