lass 2 configs: add privoxy configs
lass 2: retiolum_privoxy -> privoxy-retiolum
This commit is contained in:
parent
eff469ebef
commit
02eb997d3e
lass
|
@ -14,6 +14,7 @@ in {
|
|||
../2configs/retiolum.nix
|
||||
../2configs/fastpoke-pages.nix
|
||||
../2configs/new-repos.nix
|
||||
../2configs/privoxy-retiolum.nix
|
||||
{
|
||||
networking.interfaces.enp2s1.ip4 = [
|
||||
{
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
../2configs/wordpress.nix
|
||||
../2configs/bitlbee.nix
|
||||
../2configs/firefoxPatched.nix
|
||||
../2configs/wallpaper.nix
|
||||
];
|
||||
|
||||
krebs.build = {
|
||||
|
|
21
lass/2configs/privoxy-retiolum.nix
Normal file
21
lass/2configs/privoxy-retiolum.nix
Normal 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
15
lass/2configs/privoxy.nix
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue