@@ -1,69 +0,0 @@
1−{ config, lib, pkgs, ... }:
5− cfg = config.services.tor;
7− torify = pkgs.writeTextFile {
10− #!${pkgs.stdenv.shell}
11− TSOCKS_CONF_FILE=${pkgs.writeText "tsocks.conf" cfg.torify.config} LD_PRELOAD="${pkgs.tsocks}/lib/libtsocks.so $LD_PRELOAD" "$@"
14− destination = "/bin/torify";
25− services.tor.torify = {
28− default = cfg.client.enable;
30− Whether to build torify scipt to relay application traffic via TOR.
35− default = "localhost:9050";
36− example = "192.168.0.20";
38− IP address of TOR client to use.
45− Extra configuration. Contents will be added verbatim to TSocks
54− ###### implementation
56− config = mkIf cfg.torify.enable {
58− environment.systemPackages = [ torify ]; # expose it to the users
60− services.tor.torify.config = ''
61− server = ${toString(head (splitString ":" cfg.torify.server))}
62− server_port = ${toString(tail (splitString ":" cfg.torify.server))}
64− local = 127.0.0.0/255.128.0.0
65− local = 127.128.0.0/255.192.0.0