From: "Tomáš Čech" <sleep_walker@gnu.org>
To: guix-devel@gnu.org
Subject: [PATCH 2/3] services: Add wpa-supplicant-service.
Date: Wed, 9 Nov 2016 22:22:44 +0100 [thread overview]
Message-ID: <20161109212245.23531-2-sleep_walker@gnu.org> (raw)
In-Reply-To: <20161109212245.23531-1-sleep_walker@gnu.org>
* gnu/services/networking.scm (wpa-supplicant-service): New procedure.
(wpa-supplicant-service-type): New variable.
(wpa-supplicant-shepherd-service): New procedure.
* doc/guix.texi (Networking Services): Document it.
---
doc/guix.texi | 8 ++++++++
gnu/services/networking.scm | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 89a7a58..bdf0bce 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8301,6 +8301,14 @@ 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.
+@end deffn
+
@deffn {Scheme Procedure} ntp-service [#:ntp @var{ntp}] @
[#:servers @var{%ntp-servers}] @
[#:allow-large-adjustment? #f]
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index df609da..05ee339 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -64,7 +64,8 @@
wicd-service
network-manager-service
- connman-service))
+ connman-service
+ wpa-supplicant-service))
;;; Commentary:
;;;
@@ -740,4 +741,37 @@ several the @command{connmanctl} command to interact with the daemon and
configure networking."
(service connman-service-type connman))
+
+\f
+;;;
+;;; 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")))
+ (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)))))
+
+(define* (wpa-supplicant-service #:key (wpa-supplicant 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 wpa-supplicant-service-type wpa-supplicant))
+
;;; networking.scm ends here
--
2.10.2
next prev parent reply other threads:[~2016-11-09 21:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 21:22 [PATCH 1/3] gnu: connman: Use localstatedir outside of store Tomáš Čech
2016-11-09 21:22 ` Tomáš Čech [this message]
2016-11-09 22:32 ` [PATCH 2/3] services: Add wpa-supplicant-service Ludovic Courtès
2016-11-12 18:16 ` Tomáš Čech
2016-11-14 9:58 ` Ludovic Courtès
2016-11-09 21:22 ` [PATCH 3/3] services: Require wpa-supplicant-service for connman-service Tomáš Čech
2016-11-09 22:33 ` Ludovic Courtès
2016-11-09 22:25 ` [PATCH 1/3] gnu: connman: Use localstatedir outside of store Ludovic Courtès
2016-11-10 7:55 ` Efraim Flashner
2016-11-11 14:38 ` Hartmut Goebel
2016-11-12 11:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161109212245.23531-2-sleep_walker@gnu.org \
--to=sleep_walker@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).