>From 3631a5f6742b31ac173a6d32cb3e7074f1ce0aa5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer
Date: Mon, 7 Aug 2017 00:07:53 -0400 Subject: [PATCH] services: Add auto-enable? parameter to the bluetooth-service * gnu/services/desktop.scm (bluetooth-configuration): New record. (bluetooth-shepherd-service): Use it. (bluetooth-directory): New method. (bluetooth-service-type): Use it to extend the etc-service-type service. (bluetooth-service): Add `auto-enable?' parameter. * doc/guix.texi: Document it. --- doc/guix.texi | 11 ++++++++--- gnu/services/desktop.scm | 50 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6b4b19d0c..63186f6ab 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -39,6 +39,7 @@ Copyright @copyright{} 2017 address@hidden Copyright @copyright{} 2017 Christopher Allan address@hidden Copyright @copyright{} 2017 Marius address@hidden Copyright @copyright{} 2017 Hartmut Goebel +Copyright @copyright{} 2017 Maxim address@hidden Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -11712,9 +11713,13 @@ location databases. See web site} for more information. @end deffn address@hidden {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] -Return a service that runs the @command{bluetoothd} daemon, which manages -all the Bluetooth devices and provides a number of D-Bus interfaces. address@hidden {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @ + address@hidden:auto-enable? #f}] +Return a service that runs the @command{bluetoothd} daemon, which +manages all the Bluetooth devices and provides a number of D-Bus +interfaces. When AUTO-ENABLE? is true, the bluetooth controller is +powered automatically at boot, which can be useful when using a +bluetooth keyboard or mouse. Users need to be in the @code{lp} group to access the D-Bus service. @end deffn diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 50a561bf5..8b6c2793c 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Sou Bunnbu +;;; Copyright © 2017 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -381,32 +382,67 @@ site} for more information." ;;; Bluetooth. ;;; -(define (bluetooth-shepherd-service bluez) +(define-record-type*