git.iko.soy/typeable/nixpkgs
on master help sign in
nixos: Remove torify module

'torify' now ships with the tor bundle itself; and using torsocks is recommended over tsocks (torify will use torsocks automatically.) Signed-off-by: Austin Seipp <aseipp@pobox.com>

commit1b26faeb6994151b8f8842f340fe4c1b820f09fb authorAustin Seipp <aseipp@pobox.com> dateFri 5 Dec 2014, 22:23 (12 years ago) parent47eabfa
2 files changed−70
nixos/modules/module-list.nix−1 nixos/modules/services/security/torify.nix−69
nixos/modules/module-list.nix−1
@@ -302,7 +302,6 @@
302302 ./services/security/fprot.nix
303303 ./services/security/frandom.nix
304304 ./services/security/haveged.nix
305− ./services/security/torify.nix
306305 ./services/security/tor.nix
307306 ./services/security/torsocks.nix
308307 ./services/system/dbus.nix
nixos/modules/services/security/torify.nixdeleted−69
@@ -1,69 +0,0 @@
1−{ config, lib, pkgs, ... }:
2−with lib;
3−let
4−
5− cfg = config.services.tor;
6−
7− torify = pkgs.writeTextFile {
8− name = "torify";
9− text = ''
10− #!${pkgs.stdenv.shell}
11− TSOCKS_CONF_FILE=${pkgs.writeText "tsocks.conf" cfg.torify.config} LD_PRELOAD="${pkgs.tsocks}/lib/libtsocks.so $LD_PRELOAD" "$@"
12− '';
13− executable = true;
14− destination = "/bin/torify";
15− };
16−
17−in
18−
19−{
20−
21− ###### interface
22−
23− options = {
24−
25− services.tor.torify = {
26−
27− enable = mkOption {
28− default = cfg.client.enable;
29− description = ''
30− Whether to build torify scipt to relay application traffic via TOR.
31− '';
32− };
33−
34− server = mkOption {
35− default = "localhost:9050";
36− example = "192.168.0.20";
37− description = ''
38− IP address of TOR client to use.
39− '';
40− };
41−
42− config = mkOption {
43− default = "";
44− description = ''
45− Extra configuration. Contents will be added verbatim to TSocks
46− configuration file.
47− '';
48− };
49−
50− };
51−
52− };
53−
54− ###### implementation
55−
56− config = mkIf cfg.torify.enable {
57−
58− environment.systemPackages = [ torify ]; # expose it to the users
59−
60− services.tor.torify.config = ''
61− server = ${toString(head (splitString ":" cfg.torify.server))}
62− server_port = ${toString(tail (splitString ":" cfg.torify.server))}
63−
64− local = 127.0.0.0/255.128.0.0
65− local = 127.128.0.0/255.192.0.0
66− '';
67− };
68−
69−}