Sample Header Ad - 728x90

How to enable bluetooth in GUIX?

5 votes
2 answers
3241 views
I'm trying to enable Bluetooth on my GUIX machine, and I do not understand [the instructions](https://guix.gnu.org/manual/en/guix.html#index-bluetooth_002dservice) : > **Scheme Procedure: bluetooth-service [#:bluez bluez] [#:auto-enable? #f]** > > Return a service that runs the 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 lp group to access the D-Bus service. In particular, I do not understand the [#: part, and thus do not know what to put in my config.scm. None of the other modifications I've made to config.scm required such 'arguments' for lack of a better word. For example, extra-special-file is described simply as > **Scheme Procedure: extra-special-file file target** and contains an example and was thus easy to figure out. This does not work:
(services
    (append
      (list (service gnome-desktop-service-type)
            (service bluetooth-service))
      %desktop-services))
reconfigure gives
guix system: error: failed to load 'config.scm':
gnu/services.scm:242:17: In procedure %service-with-default-value:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #
Apparently the #: is a hash-colon, which is used to define a [keyword in Scheme](https://www.gnu.org/software/guile/manual/guile.html#Keywords) . But that page does not give me enough information to translate the GUIX instructions into something to put in config.scm. It feels like the GUIX documentation assumes some Scheme knowledge that I do not yet posses, and I do not really know where to start to obtain. An example would be appreciated.
Asked by BlackShift (313 rep)
Nov 3, 2020, 08:42 PM
Last activity: Mar 17, 2023, 10:10 AM