summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi6
-rw-r--r--gnu/services/games.scm8
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 97344083470..3ae39ebcd97 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39358,6 +39358,7 @@ like to serve.
@subsubheading Joycond service
@cindex joycond
+@cindex nintendo controllers
The joycond service allows the pairing of Nintendo joycon game
controllers over Bluetooth. (@pxref{Desktop Services} for setting up
Bluetooth.)
@@ -39372,7 +39373,10 @@ The joycond package to use.
@end deftp
@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
@subsubheading The Battle for Wesnoth Service
diff --git a/gnu/services/games.scm b/gnu/services/games.scm
index e63c1c12993..2557b82bec7 100644
--- a/gnu/services/games.scm
+++ b/gnu/services/games.scm
@@ -23,6 +23,7 @@
#:use-module (gnu services shepherd)
#:use-module (gnu packages admin)
#:use-module (gnu packages games)
+ #:use-module ((gnu services base) #:select (udev-service-type))
#:use-module (gnu system shadow)
#:use-module ((gnu system file-systems) #:select (file-system-mapping))
#:use-module (gnu build linux-container)
@@ -61,10 +62,13 @@
(service-type
(name 'joycond)
(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
(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))))