services: Add wpa-supplicant-service.

* gnu/services/networking.scm (wpa-supplicant-service): New procedure.
(wpa-supplicant-service-type): New variable.
* doc/guix.texi (Networking Services): Document it.
This commit is contained in:
Tomáš Čech 2016-11-09 21:38:38 +01:00
parent 028bf3c0b2
commit 2cccbc2af2
No known key found for this signature in database
GPG key ID: 4A23E34FA033436D
2 changed files with 39 additions and 1 deletions

View file

@ -8397,6 +8397,15 @@ several the @command{connmanctl} command to interact with the daemon and
configure networking."
@end deffn
@cindex WPA Supplicant
@deffn {Scheme Procedure} wpa-supplicant-service @
[#:wpa-supplicant @var{wpa-supplicant}]
Return a service that runs @url{https://w1.fi/wpa_supplicant/,WPA
supplicant}, an authentication daemon required to authenticate against
encrypted WiFi or ethernet networks. Service is started to listen for
requests on D-Bus.
@end deffn
@cindex NTP
@cindex real time clock
@deffn {Scheme Procedure} ntp-service [#:ntp @var{ntp}] @

View file

@ -64,7 +64,8 @@ (define-module (gnu services networking)
wicd-service
network-manager-service
connman-service))
connman-service
wpa-supplicant-service-type))
;;; Commentary:
;;;
@ -740,4 +741,32 @@ (define* (connman-service #:key (connman connman))
configure networking."
(service connman-service-type connman))
;;;
;;; WPA supplicant
;;;
(define (wpa-supplicant-shepherd-service wpa-supplicant)
"Return a shepherd service for wpa_supplicant"
(list (shepherd-service
(documentation "Run WPA supplicant with dbus interface")
(provision '(wpa-supplicant))
(requirement '(user-processes dbus-system loopback))
(start #~(make-forkexec-constructor
(list (string-append #$wpa-supplicant
"/sbin/wpa_supplicant")
"-u" "-B" "-P/var/run/wpa_supplicant.pid")
#:pid-file "/var/run/wpa_supplicant.pid"))
(stop #~(make-kill-destructor)))))
(define wpa-supplicant-service-type
(service-type (name 'wpa-supplicant)
(extensions
(list (service-extension shepherd-root-service-type
wpa-supplicant-shepherd-service)
(service-extension dbus-root-service-type list)
(service-extension profile-service-type list)))))
;;; networking.scm ends here