From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 03 16:50:28 2021 Received: (at submit) by debbugs.gnu.org; 3 Jul 2021 20:50:28 +0000 Received: from localhost ([127.0.0.1]:39980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzmaq-00049q-DV for submit@debbugs.gnu.org; Sat, 03 Jul 2021 16:50:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:35488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzmao-00049i-0P for submit@debbugs.gnu.org; Sat, 03 Jul 2021 16:50:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzman-0002gB-Dd for guix-patches@gnu.org; Sat, 03 Jul 2021 16:50:25 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:41007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzmak-0000Rb-NE for guix-patches@gnu.org; Sat, 03 Jul 2021 16:50:25 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 167F3240004 for ; Sat, 3 Jul 2021 20:50:18 +0000 (UTC) From: Brice Waegeneire To: guix-patches@gnu.org Subject: [PATCH] services: bluetooth: Add 'extra-config' field. Date: Sat, 3 Jul 2021 22:50:15 +0200 Message-Id: <20210703205015.13862-1-brice@waegenei.re> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.178.230; envelope-from=brice@waegenei.re; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) * gnu/services/desktop.scm (bluetooth-configuration): Add 'extra-config' field. (bluetooth-configuration-file): Use it. --- gnu/services/desktop.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index cd800fcc2b..7109d5d476 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -400,14 +400,18 @@ site} for more information." bluetooth-configuration make-bluetooth-configuration bluetooth-configuration? (bluez bluetooth-configuration-bluez (default bluez)) - (auto-enable? bluetooth-configuration-auto-enable? (default #f))) + (auto-enable? bluetooth-configuration-auto-enable? (default #f)) + (extra-config bluetooth-configuration-extra-config ;list of strings + (default '()))) (define (bluetooth-configuration-file config) "Return a configuration file for the systemd bluetooth service, as a string." - (string-append - "[Policy]\n" - "AutoEnable=" (bool (bluetooth-configuration-auto-enable? - config)))) + (string-concatenate + (cons* + "[Policy]\n" + "AutoEnable=" (bool (bluetooth-configuration-auto-enable? + config)) "\n" + (bluetooth-configuration-extra-config config)))) (define (bluetooth-directory config) (computed-file "etc-bluetooth" -- 2.31.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 07 10:35:12 2021 Received: (at 49366) by debbugs.gnu.org; 7 Jul 2021 14:35:13 +0000 Received: from localhost ([127.0.0.1]:53200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m18ds-0000dL-NO for submit@debbugs.gnu.org; Wed, 07 Jul 2021 10:35:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m18dr-0000d1-Fb for 49366@debbugs.gnu.org; Wed, 07 Jul 2021 10:35:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60514) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m18dl-0003eA-KL; Wed, 07 Jul 2021 10:35:05 -0400 Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=43450 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m18dl-0003pU-7t; Wed, 07 Jul 2021 10:35:05 -0400 From: Mathieu Othacehe To: Brice Waegeneire Subject: Re: bug#49366: [PATCH] services: bluetooth: Add 'extra-config' field. References: <20210703205015.13862-1-brice@waegenei.re> Date: Wed, 07 Jul 2021 16:35:03 +0200 In-Reply-To: <20210703205015.13862-1-brice@waegenei.re> (Brice Waegeneire's message of "Sat, 3 Jul 2021 22:50:15 +0200") Message-ID: <87k0m242g8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49366 Cc: 49366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Brice, > * gnu/services/desktop.scm (bluetooth-configuration): Add 'extra-config' > field. > (bluetooth-configuration-file): Use it. I guess you have a specific use case in mind, adding a short documentation about the and the new extra-config field could be nice here. Otherwise it seems fine to me. Thanks, Mathieu