anchor.diff:          '';
         };
   
  +      controlSocket = {
  +        enable = mkOption {
  +          type = types.bool;
  +          default = false;
  +          description = ''
  +            Wheter to enable Tor control socket. Control socket is created
  +            in <literal>${torRunDirectory}/control</literal>
  +          '';
  +        };
  +      };
  +
         client = {
           enable = mkOption {
             type = types.bool;
  
positive.code:     ''}
  
      ${optint "ControlPort" cfg.controlPort}
    ''
    # Client connection config
    + optionalString cfg.client.enable ''
  
negative.code: 
          # Translated from the upstream contrib/dist/tor.service.in
          preStart = ''
            install -o tor -g tor -d ${torDirectory}/onion ${torRunDirectory}
            ${pkgs.tor}/bin/tor -f ${torRcFile} --verify-config
          '';
  
  