diff options
author | Evgeny Egorochkin <phreedom@yandex.ru> | 2014-12-19 06:07:52 +0200 |
---|---|---|
committer | Evgeny Egorochkin <phreedom@yandex.ru> | 2014-12-19 08:05:41 +0200 |
commit | eb0874d5ff53f91ec15d8472173e0f38a3137871 (patch) | |
tree | eadf7e98b99d7f4e95f0a24a51000360c4ad36bb /nixos | |
parent | 633cc58d5ca40ac0f6950e8c80136165fc7330c5 (diff) | |
download | nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar.gz nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar.bz2 nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar.lz nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar.xz nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.tar.zst nixlib-eb0874d5ff53f91ec15d8472173e0f38a3137871.zip |
rename torify to tsocks, to avoid name clashes and make it clear which wrapper library is used
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/security/torify.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/services/security/torify.nix b/nixos/modules/services/security/torify.nix index 53f48a714b4b..a81cdbbc172f 100644 --- a/nixos/modules/services/security/torify.nix +++ b/nixos/modules/services/security/torify.nix @@ -5,13 +5,13 @@ let cfg = config.services.tor; torify = pkgs.writeTextFile { - name = "torify"; + name = "tsocks"; text = '' #!${pkgs.stdenv.shell} - TSOCKS_CONF_FILE=${pkgs.writeText "tsocks.conf" cfg.torify.config} LD_PRELOAD="${pkgs.tsocks}/lib/libtsocks.so $LD_PRELOAD" "$@" + TSOCKS_CONF_FILE=${pkgs.writeText "tsocks.conf" cfg.tsocks.config} LD_PRELOAD="${pkgs.tsocks}/lib/libtsocks.so $LD_PRELOAD" "$@" ''; executable = true; - destination = "/bin/torify"; + destination = "/bin/tsocks"; }; in @@ -22,12 +22,12 @@ in options = { - services.tor.torify = { + services.tor.tsocks = { enable = mkOption { - default = cfg.client.enable; + default = cfg.enable && cfg.client.enable; description = '' - Whether to build torify scipt to relay application traffic via TOR. + Whether to build tsocks wrapper script to relay application traffic via TOR. ''; }; @@ -53,13 +53,13 @@ in ###### implementation - config = mkIf cfg.torify.enable { + config = mkIf cfg.tsocks.enable { environment.systemPackages = [ torify ]; # expose it to the users - services.tor.torify.config = '' - server = ${toString(head (splitString ":" cfg.torify.server))} - server_port = ${toString(tail (splitString ":" cfg.torify.server))} + services.tor.tsocks.config = '' + server = ${toString(head (splitString ":" cfg.tsocks.server))} + server_port = ${toString(tail (splitString ":" cfg.tsocks.server))} local = 127.0.0.0/255.128.0.0 local = 127.128.0.0/255.192.0.0 |