From patchwork Sat Jul 3 20:50:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 31105 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 D74DE27BC81; Sat, 3 Jul 2021 21:51:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B01D827BC78 for ; Sat, 3 Jul 2021 21:51:08 +0100 (BST) Received: from localhost ([::1]:48342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzmbT-00030e-Of for patchwork@mira.cbaines.net; Sat, 03 Jul 2021 16:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzmbO-00030V-Qp for guix-patches@gnu.org; Sat, 03 Jul 2021 16:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzmbO-0000wW-EX for guix-patches@gnu.org; Sat, 03 Jul 2021 16:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lzmbO-0004Ag-Dj for guix-patches@gnu.org; Sat, 03 Jul 2021 16:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49366] [PATCH] services: bluetooth: Add 'extra-config' field. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jul 2021 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49366 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49366@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162534542815990 (code B ref -1); Sat, 03 Jul 2021 20:51:02 +0000 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 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 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-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" X-getmail-retrieved-from-mailbox: Patches * 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"