From b7d0c494f4c7a74c9bd339226339e23377d7c068 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 4 Feb 2015 03:39:48 -0500 Subject: services: Add wicd service. * gnu/services/networking.scm (wicd-service): New procedure. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 6 ++++++ gnu/services/networking.scm | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) 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 +;;; Copyright © 2015 Mark H Weaver ;;; ;;; 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 -- cgit v1.2.3