services: Explicitly refer to Shadow when requiring the 'nologin' shell.

* gnu/services/avahi.scm (avahi-service): Change 'shell' to a gexp
  referring to "nologin" in the SHADOW package.
* gnu/services/dbus.scm (dbus-service): Likewise.
* gnu/services/networking.scm (ntp-service, tor-service): Likewise.
This commit is contained in:
Ludovic Courtès 2015-04-17 13:53:05 +02:00
parent 8e974b9b98
commit 5e25ebe2fa
3 changed files with 6 additions and 4 deletions

View file

@ -20,6 +20,7 @@ (define-module (gnu services avahi)
#:use-module (gnu services)
#:use-module (gnu system shadow)
#:use-module (gnu packages avahi)
#:use-module (gnu packages admin)
#:use-module (guix monads)
#:use-module (guix store)
#:use-module (guix gexp)
@ -106,6 +107,6 @@ (define* (avahi-service #:key (avahi avahi)
(comment "Avahi daemon user")
(home-directory "/var/empty")
(shell
"/run/current-system/profile/sbin/nologin"))))))))
#~(string-append #$shadow "/sbin/nologin")))))))))
;;; avahi.scm ends here

View file

@ -20,6 +20,7 @@ (define-module (gnu services dbus)
#:use-module (gnu services)
#:use-module (gnu system shadow)
#:use-module (gnu packages glib)
#:use-module (gnu packages admin)
#:use-module (guix monads)
#:use-module (guix store)
#:use-module (guix gexp)
@ -99,7 +100,7 @@ (define* (dbus-service services #:key (dbus dbus))
(comment "D-Bus system bus user")
(home-directory "/var/run/dbus")
(shell
"/run/current-system/profile/sbin/nologin"))))
#~(string-append #$shadow "/sbin/nologin")))))
(activate #~(begin
(use-modules (guix build utils))

View file

@ -227,7 +227,7 @@ (define config
(comment "NTP daemon user")
(home-directory "/var/empty")
(shell
"/run/current-system/profile/sbin/nologin"))))))))
#~(string-append #$shadow "/sbin/nologin")))))))))
(define* (tor-service #:key (tor tor))
"Return a service to run the @uref{https://torproject.org,Tor} daemon.
@ -257,7 +257,7 @@ (define* (tor-service #:key (tor tor))
(comment "Tor daemon user")
(home-directory "/var/empty")
(shell
"/run/current-system/profile/sbin/nologin"))))
#~(string-append #$shadow "/sbin/nologin")))))
(documentation "Run the Tor anonymous network overlay.")))))