From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AIS4Me4jTmc1MwAA62LTzQ:P1 (envelope-from ) for ; Mon, 02 Dec 2024 21:17:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AIS4Me4jTmc1MwAA62LTzQ (envelope-from ) for ; Mon, 02 Dec 2024 22:17:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jcw4hbfG; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=aPJeJ6zZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733174254; a=rsa-sha256; cv=none; b=YA6NSeUW94oF1y5ZU6b+BA9LX7rzw7mKQMPMMUOFUaUBrQRDaW28ozG08EogZMbEUAyEKL pyG9N6bXGrp4JXCFzikeAN+wF+JxuQYwYTgHfh+exhStujXkEVBQPZbGy/QBppajLnL34D XGrXwaaXs6wJkKOCCZ4xWS3FA82W9dPJUiooqjuaU5pNa7tVx1/aDLmf00dld5qyOl7PY8 DMbcTC2V0S3nlghavLJPmBwCgQE/WY73diSwThgkArgbe2O4WptlXsfAzr3+64VsIReh1W OdljTMVzN8ypZo2xK8ceOKtmvPY9eDJa19ziZZJ/eUILaD6Ghb3FR9zZny3VNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jcw4hbfG; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=aPJeJ6zZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733174254; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NCCb1tb88+UEKQ7BSPRA1kUDcXd+9E+pdyGYAHTZOXo=; b=fKYLk4u8jEXsb5I12mumIsi9Xcm1p1fRAQ9+ANdBootSIZrFDju7IAZiqBp+fb3IsasOcD UOmDN66b1npNUe1gqMsMI7Ck8dbjMTpbMhewyWuu3/u7f60gvuCfaw3DBPcER6/E+kaaxL gV8WuCoWXAGKyxg01OZpQ08FvT94BtFpEkpW1hF3eRbyHgpqjKqPhKkJWLS/SAVVuKOj1K ACbBxCEXDh5nrrXR6ePaSK1hbg6mvnkywdY5/QhbokoNCAe4YmdSM+bGik89lmNC1ZDm67 jw+E3c9PuRrXoXOrkotk/FR7/TID7XZgkA8VypgTcvlIwUUzuJHgy5ONJ7KxXQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3CDA970A67 for ; Mon, 02 Dec 2024 22:17:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIDmy-0006DW-Kh; Mon, 02 Dec 2024 16:17:04 -0500 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 1tIDmx-0006CF-2z for guix-patches@gnu.org; Mon, 02 Dec 2024 16:17:03 -0500 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 1tIDmw-0008Jy-R5 for guix-patches@gnu.org; Mon, 02 Dec 2024 16:17:02 -0500 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=NCCb1tb88+UEKQ7BSPRA1kUDcXd+9E+pdyGYAHTZOXo=; b=jcw4hbfG07Fva50WXPrjKujl0FPfOcze5QuSbmEhsuUMsJ3bBh6+99nNW3ijJPlRLM1MLxaq5FyPpf/+HJmnqimQ3HXKEf9SomtaAvH/k8d27CJNyD5psPs/fKsbl5ztdJUUyf2/mTUwacnUpp6Jszgq54sl8t0Y0e1pofKHCfpArt7OkALHB+xtcL++sstz6sgYgFNN5TywV50UVC7TAESePE/bAjNNAQhU+Blr2qd2fekS/0f8FLuWHuenizXUSQ4J2wNlBksogf9o2qBhD9fRwGoQMpC8DBLfXIZxT7WT2031M58OEYcycU+jxFCqiH/w41PLGDzbdqZABq1Bog==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIDmw-0008Tf-LS for guix-patches@gnu.org; Mon, 02 Dec 2024 16:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74657] [PATCH] gnu: home: home-pipewire: Add extra-content to configuration. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 21:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74657 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74657@debbugs.gnu.org Cc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.173317420032539 (code B ref -1); Mon, 02 Dec 2024 21:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Dec 2024 21:16:40 +0000 Received: from localhost ([127.0.0.1]:56759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIDma-0008Sl-GR for submit@debbugs.gnu.org; Mon, 02 Dec 2024 16:16:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:43734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIDmY-0008Sd-Bh for submit@debbugs.gnu.org; Mon, 02 Dec 2024 16:16:38 -0500 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 1tIDmX-0005tt-TQ for guix-patches@gnu.org; Mon, 02 Dec 2024 16:16:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIDmW-0008Di-AM; Mon, 02 Dec 2024 16:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=NCCb1tb88+UEKQ7BSPRA1kUDcXd+9E+pdyGYAHTZOXo=; b=aPJeJ6zZW/P9Nu JUewkszALtgGrs5bT84/ZLCAnB1HV54NW8L/zTbmxjc7IX1uVW4nVF1S0MTsmSR1VAw3Io+roL7ki XGQ25gkV1sO5tfGUzYu9Ovsi//+qKk+Y1KHIB+Zw347qDXJDzvj7i10hbWPYK5r83bPcC9B3LvhwX xmh0RnekYf8PhFcV0rXF+3Rwgnftold7w0wTnlDSKCmw6GlJMlRluH8WFfIkyzlSl6KcVXLN/gAdP kSAcZikIbfTN+coSEnsKk0WbrvWV2j+POOL9Jdmex1rarIk7OxnrBe/j9tL/4R/Rd4Sv225ITEVYE owhKCSvqMrlJMkQtTHxw==; From: Janneke Nieuwenhuizen Date: Mon, 2 Dec 2024 22:16:28 +0100 Message-ID: <20241202211630.14201-1-janneke@gnu.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.72 X-Spam-Score: -4.72 X-Migadu-Queue-Id: 3CDA970A67 X-Migadu-Scanner: mx10.migadu.com X-TUID: o0pb38rYQANJ This allows for setting the default sound card/device, e.g.: pcm.!default {type hw card 0 device 2} ctl.!default {type hw card 0 device 2} * gnu/home/services/sound.scm (home-pipewire-configuration)[extra-content]: New field. * gnu/home/services/sound.scm (home-pipewire-asoundrc): Append it to "asoundrc". * doc/guix.texi (Sound Home Services): Update accordingly. Change-Id: I6ecebaaab41cd7313b16a5f365c21789db65664e --- doc/guix.texi | 3 +++ gnu/home/services/sound.scm | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8a6640124c..f5bd1bc667 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47289,6 +47289,9 @@ The WirePlumber package to use. @item @code{enable-pulseaudio?} (default: @code{#t}) (type: boolean) When true, enable PipeWire's PulseAudio emulation support, allowing PulseAudio clients to use PipeWire transparently. + +@item @code{extra-content} (default: @code{""}) (type: string) +Extra content to add to the end of @file{~/.config/alsa/asoundrc}. @end table @end deftp diff --git a/gnu/home/services/sound.scm b/gnu/home/services/sound.scm index 313a57305b..5366c0634f 100644 --- a/gnu/home/services/sound.scm +++ b/gnu/home/services/sound.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Ludovic Courtès ;;; Copyright © 2023 Brian Cully +;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,7 +50,10 @@ (define-configuration/no-serialization home-pipewire-configuration (enable-pulseaudio? (boolean #t) "When true, enable PipeWire's PulseAudio emulation support, allowing -PulseAudio clients to use PipeWire transparently.")) +PulseAudio clients to use PipeWire transparently.") + (extra-content + (string "") + "Extra content to add to the end of @file{~/.config/alsa/asoundrc}.")) (define (home-pipewire-shepherd-service config) (shepherd-service @@ -93,7 +97,7 @@ (define (home-pipewire-shepherd-services config) (define (home-pipewire-asoundrc config) (match-record config - (pipewire) + (pipewire extra-content) (mixed-text-file "asoundrc" "<" pipewire "/share/alsa/alsa.conf.d/50-pipewire.conf>\n" @@ -103,7 +107,8 @@ (define (home-pipewire-asoundrc config) "}\n" "ctl_type.pipewire {\n" " lib \"" pipewire "/lib/alsa-lib/libasound_module_ctl_pipewire.so\"\n" - "}\n"))) + "}\n" + extra-content))) (define home-pipewire-disable-pulseaudio-auto-start (plain-file "client.conf" "autospawn = no")) -- 2.46.0