services: Extend udev rules in joycond-service-type.

* gnu/services/games.scm (joycond-service-type): Also extend the udev service
with the configured joycond package.
* doc/guix.texi (Game Services): Update documentation.

Change-Id: I9f7fb0da5cfc1f8a7e8bb5f2ce7161e5e66b2f5e
This commit is contained in:
Maxim Cournoyer 2024-09-17 12:23:41 +09:00
parent 6954cc6c7a
commit cf3f9230c3
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 11 additions and 3 deletions

View file

@ -39358,6 +39358,7 @@ like to serve.
@subsubheading Joycond service @subsubheading Joycond service
@cindex joycond @cindex joycond
@cindex nintendo controllers
The joycond service allows the pairing of Nintendo joycon game The joycond service allows the pairing of Nintendo joycon game
controllers over Bluetooth. (@pxref{Desktop Services} for setting up controllers over Bluetooth. (@pxref{Desktop Services} for setting up
Bluetooth.) Bluetooth.)
@ -39372,7 +39373,10 @@ The joycond package to use.
@end deftp @end deftp
@defvar joycond-service-type @defvar joycond-service-type
Service type for the joycond service. Service type for the joycond service. It also extends the
@code{udev-service-type} with the @code{joycond} package (provided via
the @code{joycond-configuration} configuration), so that joycond
controllers can be detected and used by an unprivileged user.
@end defvar @end defvar
@subsubheading The Battle for Wesnoth Service @subsubheading The Battle for Wesnoth Service

View file

@ -23,6 +23,7 @@ (define-module (gnu services games)
#:use-module (gnu services shepherd) #:use-module (gnu services shepherd)
#:use-module (gnu packages admin) #:use-module (gnu packages admin)
#:use-module (gnu packages games) #:use-module (gnu packages games)
#:use-module ((gnu services base) #:select (udev-service-type))
#:use-module (gnu system shadow) #:use-module (gnu system shadow)
#:use-module ((gnu system file-systems) #:select (file-system-mapping)) #:use-module ((gnu system file-systems) #:select (file-system-mapping))
#:use-module (gnu build linux-container) #:use-module (gnu build linux-container)
@ -61,10 +62,13 @@ (define joycond-service-type
(service-type (service-type
(name 'joycond) (name 'joycond)
(description (description
"Run @command{joycond} for pairing Nintendo joycons via Bluetooth.") "Run @command{joycond} for pairing Nintendo joycons via Bluetooth and
install udev rules required to use the controller as an unprivileged user.")
(extensions (extensions
(list (service-extension shepherd-root-service-type (list (service-extension shepherd-root-service-type
joycond-shepherd-service))) joycond-shepherd-service)
(service-extension udev-service-type
(compose list joycond-configuration-package))))
(default-value (joycond-configuration)))) (default-value (joycond-configuration))))