diff options
author | Jan Malakhovski <oxij@oxij.org> | 2017-03-11 17:55:12 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2017-03-16 21:06:12 +0000 |
commit | 6d25f77a643762d718c49ab3fc86e0262d2d38fd (patch) | |
tree | c092f2faecb86aad3d018e59e124e32d070b0217 /nixos | |
parent | 00ed0f792e9e69600c658a712e0aa88c442ba4e9 (diff) | |
download | nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar.gz nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar.bz2 nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar.lz nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar.xz nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.tar.zst nixlib-6d25f77a643762d718c49ab3fc86e0262d2d38fd.zip |
nixos: tor: add enableGeoIP
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/security/tor.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index 47f863b96df2..3b4d77a6f7b1 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -12,6 +12,10 @@ let torRc = '' User tor DataDirectory ${torDirectory} + ${optionalString cfg.enableGeoIP '' + GeoIPFile ${pkgs.tor.geoip}/share/tor/geoip + GeoIPv6File ${pkgs.tor.geoip}/share/tor/geoip6 + ''} ${optint "ControlPort" cfg.controlPort} '' @@ -58,6 +62,18 @@ in ''; }; + enableGeoIP = mkOption { + type = types.bool; + default = true; + description = '' + Whenever to configure Tor daemon to use GeoIP databases. + + Disabling this will disable by-country statistics for + bridges and relays and some client and third-party software + functionality. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; |