M doc/guix.texi => doc/guix.texi +3 -0
@@ 23231,6 23231,9 @@ For any transport plugin you include in this list, appropriate
configuration line to enable transport plugin will be automatically
added to the default configuration file.
+@item @code{auto-start?} (default: @code{#t})
+Whether or not to start the Tor daemon on boot.
+
@end table
@end deftp
M gnu/services/networking.scm => gnu/services/networking.scm +6 -1
@@ 187,6 187,7 @@
tor-configuration-socks-socket-type
tor-configuration-control-socket-path
tor-configuration-transport-plugins
+ tor-configuration-auto-start
tor-onion-service-configuration
tor-onion-service-configuration?
tor-onion-service-configuration-name
@@ 1171,7 1172,9 @@ applications in communication. It is used by Jami, for example.")))
(control-socket? tor-configuration-control-socket-path
(default #f))
(transport-plugins tor-configuration-transport-plugins
- (default '())))
+ (default '()))
+ (auto-start? tor-configuration-auto-start
+ (default #t)))
(define %tor-accounts
;; User account and groups for Tor.
@@ 1284,6 1287,7 @@ HiddenServicePort ~a ~a~%"
"Return a <shepherd-service> running Tor."
(let* ((torrc (tor-configuration->torrc config))
(transport-plugins (tor-configuration-transport-plugins config))
+ (auto-start? (tor-configuration-auto-start config))
(tor (least-authority-wrapper
(file-append (tor-configuration-tor config) "/bin/tor")
#:name "tor"
@@ 1320,6 1324,7 @@ HiddenServicePort ~a ~a~%"
(start #~(make-forkexec-constructor
(list #$tor "-f" #$torrc)
#:user "tor" #:group "tor"))
+ (auto-start? auto-start?)
(stop #~(make-kill-destructor))
(actions (list (shepherd-configuration-action torrc)))
(documentation "Run the Tor anonymous network overlay.")))))