nixos: tor: add enableGeoIP
This commit is contained in:
parent
00ed0f792e
commit
6d25f77a64
|
@ -12,6 +12,10 @@ let
|
||||||
torRc = ''
|
torRc = ''
|
||||||
User tor
|
User tor
|
||||||
DataDirectory ${torDirectory}
|
DataDirectory ${torDirectory}
|
||||||
|
${optionalString cfg.enableGeoIP ''
|
||||||
|
GeoIPFile ${pkgs.tor.geoip}/share/tor/geoip
|
||||||
|
GeoIPv6File ${pkgs.tor.geoip}/share/tor/geoip6
|
||||||
|
''}
|
||||||
|
|
||||||
${optint "ControlPort" cfg.controlPort}
|
${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 {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
|
Loading…
Reference in New Issue