sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.36k stars 192 forks source link

update path to tor on nixos #1541

Closed AronGahagan closed 1 day ago

AronGahagan commented 2 days ago

I'm afraid I don't know enough about all this to submit a pull request, but on NixOS, in the file

~/.sparrow/tor/work/.kmptor/tor

the command (in NixOS) is (something like):

exec /nix/store/7i5qcshkq7brb8n0bxdkmb1vfm1pwbbc-tor-0.4.8.13/bin/tor "$@"

but if tor gets updated in the nix store, that path changes (to include a hash and a version, etc.), so the command (for NixOS) should be

exec /run/current-system/sw/bin/tor "$@"

the above path is what you get from running which tor - tested and works in sparrow 1.9.1 (latest release available in the nixpgs).

craigraw commented 1 day ago

See https://sparrowwallet.com/docs/faq.html#does-sparrow-require-tor. Sparrow starts it's own, bundled Tor if Tor is required and an external Tor proxy is not configured. This is what is in ~/.sparrow/tor/work/.kmptor/tor.

If you are running NixOS with Tor installed, I suggest configuring Sparrow to use that instead in the Server Preferences (probably 127.0.0.1 and port 9050).

AronGahagan commented 1 day ago

Thanks, @craigraw - either way, the hard-coded path generated by sparrow returns 'file not found' when I tried to connect. Updating it to the above fixed it, is version agnostic, and is update-proof. Fantastic app, btw. Thanks again.