Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/tor: use RuntimeDirectory, StateDirectory #39083

Merged
merged 1 commit into from Apr 18, 2018

Conversation

dotlambda
Copy link
Member

Motivation for this change

#37827 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

/cc @oxij @offlinehacker

@@ -705,7 +705,6 @@ in

# 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
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serviceConfig.ExecStartPre can be then used. This saves one derivation because no script has to be created. Also it generates more readable systemd units.

@oxij
Copy link
Member

oxij commented Apr 17, 2018 via email

@dotlambda dotlambda merged commit 5bd12c6 into NixOS:master Apr 18, 2018
@dotlambda dotlambda deleted the tor-runtime-dir branch April 18, 2018 07:42
@dotlambda
Copy link
Member Author

If I was to write a Tor test, what would you guys think of including it in the tested jobset? I'm accessing some of my servers (located behind a NAS) using Tor instead of dynamic DNS and if I had upgraded them, I would have lost access.

@oxij
Copy link
Member

oxij commented May 1, 2018 via email

@oxij oxij mentioned this pull request Jun 11, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants