diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-11-18 15:40:14 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-11-18 15:44:40 +0100 |
commit | 2a358911b0cf5273380bb4f22a74879f31cecaaf (patch) | |
tree | 6019cd6eb417a28373c9198222d007967c4a716d /gnu | |
parent | 8b56983999657b52f9023c767428e338eb0f21f0 (diff) | |
download | guix-2a358911b0cf5273380bb4f22a74879f31cecaaf.tar.gz guix-2a358911b0cf5273380bb4f22a74879f31cecaaf.zip |
services: tor: Remove unnecessary modules from shepherd environment.
This is a followup to fb868cd7794f15e21298e5bdea996fbf0dad17ca.
* gnu/services/networking.scm (tor-shepherd-service): Remove unused
'with-imported-modules' and 'modules' field.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/networking.scm | 38 |
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." |