anchor.diff:          '';
         };
   
  +      package = mkOption {
  +        type = types.package;
  +        default = pkgs.tor;
  +        defaultText = "pkgs.tor";
  +        example = literalExample "pkgs.tor";
  +        description = ''
  +          Tor package to use
  +        '';
  +      };
  +
         enableGeoIP = mkOption {
           type = types.bool;
           default = true;
  
positive.code:         serviceConfig =
            { Type         = "simple";
              # Translated from the upstream contrib/dist/tor.service.in
              ExecStartPre = "${pkgs.tor}/bin/tor -f ${torRcFile} --verify-config";
              ExecStart    = "${pkgs.tor}/bin/tor -f ${torRcFile}";
              ExecReload   = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
              KillSignal   = "SIGINT";
              TimeoutSec   = 30;
  
negative.code:     User tor
      DataDirectory ${torDirectory}
      ${optionalString cfg.enableGeoIP ''
        GeoIPFile ${cfg.package.geoip}/share/tor/geoip
        GeoIPv6File ${cfg.package.geoip}/share/tor/geoip6
      ''}
  
      ${optint "ControlPort" cfg.controlPort}
  