diff options
author | Mark H Weaver <mhw@netris.org> | 2015-02-04 03:39:48 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-02-04 18:20:17 -0500 |
commit | b7d0c494f4c7a74c9bd339226339e23377d7c068 (patch) | |
tree | efbd5906df2c25e4a479d22688fde71f2c563aa5 | |
parent | 10b60c043036fd73bb2dc46a4e8faea6d965e5c4 (diff) | |
download | patches-b7d0c494f4c7a74c9bd339226339e23377d7c068.tar patches-b7d0c494f4c7a74c9bd339226339e23377d7c068.tar.gz |
services: Add wicd service.
* gnu/services/networking.scm (wicd-service): New procedure.
* doc/guix.texi (Networking Services): Document it.
-rw-r--r-- | doc/guix.texi | 6 | ||||
-rw-r--r-- | gnu/services/networking.scm | 27 |
2 files changed, 32 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index bd985f956c..ada4050b17 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4453,6 +4453,12 @@ Return a service that starts @var{interface} with address @var{ip}. If gateway. @end deffn +@cindex wicd +@deffn {Monadic Procedure} wicd-service [#:wicd @var{wicd}] +Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a +network manager that aims to simplify wired and wireless networking. +@end deffn + @deffn {Monadic Procedure} ntp-service [#:ntp @var{ntp}] @ [#:name-service @var{%ntp-servers}] Return a service that runs the daemon from @var{ntp}, the diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index f0c3538e0b..a2d8e3a045 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ #:use-module (gnu packages tor) #:use-module (gnu packages messaging) #:use-module (gnu packages ntp) + #:use-module (gnu packages wicd) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) @@ -34,7 +36,8 @@ %ntp-servers ntp-service tor-service - bitlbee-service)) + bitlbee-service + wicd-service)) ;;; Commentary: ;;; @@ -297,4 +300,26 @@ configuration file." (shell #~(string-append #$shadow "/sbin/nologin"))))))))) +(define* (wicd-service #:key (wicd wicd)) + "Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a network +manager that aims to simplify wired and wireless networking." + (with-monad %store-monad + (return + (service + (documentation "Run the Wicd network manager.") + (provision '(networking)) + (requirement '(user-processes dbus-system loopback)) + (start #~(make-forkexec-constructor + (list (string-append #$wicd "/sbin/wicd") + "--no-daemon"))) + (stop #~(make-kill-destructor)) + (activate + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/etc/wicd") + (let ((file-name "/etc/wicd/dhclient.conf.template.default")) + (unless (file-exists? file-name) + (copy-file (string-append #$wicd file-name) + file-name))))))))) + ;;; networking.scm ends here |