From patchwork Thu Sep 19 01:02:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 31163 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E77C227BBEA; Thu, 19 Sep 2024 02:04:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8364127BBE9 for ; Thu, 19 Sep 2024 02:04:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sr5aM-00068b-DB; Wed, 18 Sep 2024 21:03:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sr5aJ-00067b-C8 for guix-patches@gnu.org; Wed, 18 Sep 2024 21:03:52 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sr5aF-0001bp-Et; Wed, 18 Sep 2024 21:03:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=BnGRsxqV7wf6S1L4mDlFzCgYa5fzdbDgxsmO6y7s/kY=; b=s+KsktLsCWzNVniISpwyirclx1LYM3nu6FOEiSOn7LFokG5TQoR2XbKqRbO24LUPQLfCIMoRggyC8WE9GeuxgMG9Whck8ad2UcQ664hRYmRqU4juTl042EjVYzKm9050NC6gUBXkt7UA3FbT1X/VUKUtO66cp040EUJo8ZblGJq1PB1ee4c9leE5AUfApu6MW3mVg5PV9MrK9zxbqN3p1OILHWurxbRThlar7FI+aN9XFc53+3Qke0bchveY+2/6mcJm460iaqznohcQhqWjMxWrwgeXBoiO5bwZ9hK4k613Dxuh73rlaF7HXeWcABREYh/7dSe3SV5hp49M87G7xw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sr5aU-00004r-OO; Wed, 18 Sep 2024 21:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73341] [PATCH 1/4] services: Extend udev rules in joycond-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 19 Sep 2024 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73341 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73341@debbugs.gnu.org Cc: Maxim Cournoyer , Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.172670778632631 (code B ref -1); Thu, 19 Sep 2024 01:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Sep 2024 01:03:06 +0000 Received: from localhost ([127.0.0.1]:59420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr5Za-0008UD-1U for submit@debbugs.gnu.org; Wed, 18 Sep 2024 21:03:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:37976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr5ZX-0008Tz-BD for submit@debbugs.gnu.org; Wed, 18 Sep 2024 21:03:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sr5ZG-00063r-Bb for guix-patches@gnu.org; Wed, 18 Sep 2024 21:02:46 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sr5ZE-0001Z5-Kh for guix-patches@gnu.org; Wed, 18 Sep 2024 21:02:46 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7198cb6bb02so178065b3a.3 for ; Wed, 18 Sep 2024 18:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726707761; x=1727312561; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BnGRsxqV7wf6S1L4mDlFzCgYa5fzdbDgxsmO6y7s/kY=; b=mBnXXODTblO4rLvKZ/ruH/gkqe4l+nmYkZAQNcg6VvVOtW/iB6Z0Nn2bMvxTTimI00 RbPiqQ1fD6yhqsDGUBc1/c7i4Q2l80xpuqvxj2vQeqwpkdXFeYdhFHNaeKi8aKhlf6eR K66SIfv062Z/KJngcg5V/Ml2D/rjDcOpup4AeLlfpLgP81EA8C4fgjHBl0eBUSURkGj7 8P/LAdx/8tsWDunNAlYy2rj3jSRBZpd6n6uvwF+ifwoxIhUHAKS3mwikXKoplZFcAeC9 D+rA7QZaglULf4fXzI0TDB6vGlUKxThNS6eV5UZr/zVQKoEFsLlR38BEsibEDFFWhoWf xeWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726707761; x=1727312561; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BnGRsxqV7wf6S1L4mDlFzCgYa5fzdbDgxsmO6y7s/kY=; b=pMS5WceFbWJnaFT76bvk8XepDGvvOm1VxtAOFdI3qBNzpH5HxLneNRBUY2PLKS1Lag UBSwU66T/ODewnOH7vI4Agdi9lBF9K/uEuD83E7uv8dabg/WdzY4SNrI+OYhYavTpRNG d1YVfdMr91aSYEo1nzr+J16fShE3Ffz917HJijULAnACRhbrmoOgpIRuVNZqCM/lY/L9 axwpDv0ZPIJLfuzRR4AUI8Tb1S6wI97xcEKEyPtth2C0ATcIuUf+KWSNgn0jPaA5oOwj +Z8aaCZN3YykDn4El8C6cSG5vFR7b8qAVc3ckRLmk74GE6EUsoJBl9z6oYNFOZHeiVYC tDFw== X-Gm-Message-State: AOJu0Yz3WbskBeHZf4/wyVHoQ6Q4TNyVw03rBUCURfKAlcIqzc4H/+D7 5YNCDe+JnN1RsMd9b5P9xs3LwpGxgvSyNsVkJjm4APw+6TwSiVrHX6LLZg== X-Google-Smtp-Source: AGHT+IFj7adKQsv7sz+7RyyRoM8uCijwN9y5O3pA+haTNmdI4PvVjfcHqN0ZdZ3SnxHaUyPT7q3TWA== X-Received: by 2002:a05:6a00:1253:b0:714:2482:ab3c with SMTP id d2e1a72fcca58-7192606bb00mr37410060b3a.7.1726707761160; Wed, 18 Sep 2024 18:02:41 -0700 (PDT) Received: from hurd.lan ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944b97e45sm7250795b3a.164.2024.09.18.18.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 18:02:40 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 19 Sep 2024 10:02:32 +0900 Message-ID: <724f76404f027ac784545845b743bb87bc012a4c.1726707755.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 --- doc/guix.texi | 6 +++++- gnu/services/games.scm | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) base-commit: 8dae6b47542b906682f83b06b0478fcbd0776fd6 diff --git a/doc/guix.texi b/doc/guix.texi index bc4d306c2d..d63b57300f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -39353,6 +39353,7 @@ Game Services @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.) @@ -39367,7 +39368,10 @@ Game Services @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 e63c1c1299..2557b82bec 100644 --- a/gnu/services/games.scm +++ b/gnu/services/games.scm @@ -23,6 +23,7 @@ (define-module (gnu services games) #: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 @@ (define joycond-service-type (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))))