summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/services/networking.scm38
1 files changed, 16 insertions, 22 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 18d1eb5b8c..de02f16a34 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1011,30 +1011,24 @@ HiddenServicePort ~a ~a~%"
                                       (source torrc)
                                       (target source)))
                     #:namespaces (delq 'net %namespaces))))
-       (with-imported-modules (source-module-closure
-                               '((gnu build shepherd)
-                                 (gnu system file-systems)))
-         (list (shepherd-service
-                (provision '(tor))
-
-                ;; Tor needs at least one network interface to be up, hence the
-                ;; dependency on 'loopback'.
-                (requirement '(user-processes loopback syslogd))
+       (list (shepherd-service
+              (provision '(tor))
 
-                (modules '((gnu build shepherd)
-                           (gnu system file-systems)))
+              ;; Tor needs at least one network interface to be up, hence the
+              ;; dependency on 'loopback'.
+              (requirement '(user-processes loopback syslogd))
 
-                ;; XXX: #:pid-file won't work because the wrapped 'tor'
-                ;; program would print its PID within the user namespace
-                ;; instead of its actual PID outside.  There's no inetd or
-                ;; systemd socket activation support either (there's
-                ;; 'sd_notify' though), so we're stuck with that.
-                (start #~(make-forkexec-constructor
-                          (list #$tor "-f" #$torrc)
-                          #:user "tor" #:group "tor"))
-                (stop #~(make-kill-destructor))
-                (actions (list (shepherd-configuration-action torrc)))
-                (documentation "Run the Tor anonymous network overlay."))))))))
+              ;; XXX: #:pid-file won't work because the wrapped 'tor'
+              ;; program would print its PID within the user namespace
+              ;; instead of its actual PID outside.  There's no inetd or
+              ;; systemd socket activation support either (there's
+              ;; 'sd_notify' though), so we're stuck with that.
+              (start #~(make-forkexec-constructor
+                        (list #$tor "-f" #$torrc)
+                        #:user "tor" #:group "tor"))
+              (stop #~(make-kill-destructor))
+              (actions (list (shepherd-configuration-action torrc)))
+              (documentation "Run the Tor anonymous network overlay.")))))))
 
 (define (tor-activation config)
   "Set up directories for Tor and its hidden services, if any."