services.tor.settings.SOCKSPort

See torrc manual.

Type
list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or (submodule))
Default
if config.services.tor.settings.HiddenServiceNonAnonymousMode == true
then [ { port = 0; } ]
else [ ]
Example
[
  {
    port = 9090;
  }
]
Declared
<nixpkgs/nixos/modules/services/security/tor.nix>