diff options
author | Leo Famulari <leo@famulari.name> | 2017-04-14 13:07:16 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-04-14 13:07:16 -0400 |
commit | c57ce31a896f659a2e311c2ee90b9027f4a405bc (patch) | |
tree | 17d0d0238ca1db65cce1f2ac68273af0483c9e7d /gnu/services | |
parent | f575efa12c5df9f9879b7be0fe3593a3106a346d (diff) | |
parent | 8439c9c05eab5c98d889fb1de56bc78f62a8058f (diff) | |
download | patches-c57ce31a896f659a2e311c2ee90b9027f4a405bc.tar patches-c57ce31a896f659a2e311c2ee90b9027f4a405bc.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/cuirass.scm | 2 | ||||
-rw-r--r-- | gnu/services/networking.scm | 32 |
2 files changed, 24 insertions, 10 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 237f71a09b..6beabc4b3b 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -87,7 +87,7 @@ (list (shepherd-service (documentation "Run Cuirass.") (provision '(cuirass)) - (requirement '(guix-daemon)) + (requirement '(guix-daemon networking)) (start #~(make-forkexec-constructor (list (string-append #$cuirass "/bin/cuirass") "--cache-directory" #$cache-directory diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 85fc0b843a..ae9b8f87cc 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -595,17 +595,31 @@ HiddenServicePort ~a ~a~%" (match config (($ <tor-configuration> tor) (let ((torrc (tor-configuration->torrc config))) - (list (shepherd-service - (provision '(tor)) + (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)) + ;; Tor needs at least one network interface to be up, hence the + ;; dependency on 'loopback'. + (requirement '(user-processes loopback syslogd)) - (start #~(make-forkexec-constructor - (list (string-append #$tor "/bin/tor") "-f" #$torrc))) - (stop #~(make-kill-destructor)) - (documentation "Run the Tor anonymous network overlay."))))))) + (modules '((gnu build shepherd) + (gnu system file-systems))) + + (start #~(make-forkexec-constructor/container + (list #$(file-append tor "/bin/tor") "-f" #$torrc) + + #:mappings (list (file-system-mapping + (source "/var/lib/tor") + (target source) + (writable? #t)) + (file-system-mapping + (source "/dev/log") ;for syslog + (target source))))) + (stop #~(make-kill-destructor)) + (documentation "Run the Tor anonymous network overlay.")))))))) (define (tor-hidden-service-activation config) "Return the activation gexp for SERVICES, a list of hidden services." |