From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qFLzDBSnumNDBAAAbAwnHQ (envelope-from ) for ; Sun, 08 Jan 2023 12:20:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GEz+CxSnumOQGAEAG6o9tA (envelope-from ) for ; Sun, 08 Jan 2023 12:20:52 +0100 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 C51A83800E for ; Sun, 8 Jan 2023 12:20:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pETiz-0001b9-Ur; Sun, 08 Jan 2023 06:20:25 -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 1pETix-0001ar-TS for help-guix@gnu.org; Sun, 08 Jan 2023 06:20:23 -0500 Received: from chimborazo.ee.ethz.ch ([129.132.2.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pETiv-0002m0-RP for help-guix@gnu.org; Sun, 08 Jan 2023 06:20:23 -0500 Received: from silvi (unknown [85.195.207.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by chimborazo.ee.ethz.ch (Postfix) with ESMTPSA id E003840203; Sun, 8 Jan 2023 12:19:42 +0100 (CET) From: Gabriel Wicki To: Elias Kueny Cc: help-guix@gnu.org Subject: Re: How to make audio devices available with guix shell --container References: <87o7shsld3.fsf@posteo.net> <878rjktozq.fsf@posteo.net> Date: Sun, 08 Jan 2023 12:19:39 +0100 In-Reply-To: <878rjktozq.fsf@posteo.net> (Elias Kueny's message of "Tue, 06 Dec 2022 17:01:17 +0000") Message-ID: <87zgattgs4.fsf@erlikon.ch> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=129.132.2.15; envelope-from=gabriel@erlikon.ch; helo=chimborazo.ee.ethz.ch X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673176851; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=HjlO5ppwOdkk2fdZnAP09IRV2Z8TEz2T8Jf6YoSjXlk=; b=qZdztTml9h0vdXjUbc6g3vshgQpugf0q2JiBHK64i0Tqk2JuywWmuEIEmcQzGEvE18+N67 Kverae59bo3uN3Tu9hfRxvXh4Nx5ZWYa2fEUOLU904BiGck4TYRmL6QDDG2iOVEhDpDtwP OyYinJzlwmE41aADXqssPrqmggQqZ8V3Qzlf9CULci5wwL3H8BoTzpx+WQ8uDeDXAItKBx 0m+6igxlFbrCpMcKLClzu6IjAUd42+vBZcZSYx2H0g5kk3TbMqxtWKcZ6k4/Q2VU3baCOp YbVhKpatNoXOO38DGvhMHomVHf3EWo4rFpTrFZdOFlhfOBFlokDyQeNeEo+smQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673176851; a=rsa-sha256; cv=none; b=RGdAOwCwmfg6C5hOpteZdzHbxzJl8gKgOdk4G5zklaZgYFgojNbns6ZWVrpHHzSHGtS5Wm Ehyxqkr66JskcQHY5MRj6RZ/SOncFnosWKhN9d9n/1Rr/a030k5/poUHiANQpz5a3u2uaN KYHd6FNl9OIz1fhuwgdkkccf9/6JqYWdZUZS8N0O55XBcfxVweP417lXoXl0fqNEPALcQ9 yXK4q13u1Y2iH1tJ3dNG8bWoWGSuJ1C46mYofzbz1YKX7sW17jaxbYqHVlrvsywX/QACrD d+yF/vtBJNKg1jt7b/14Thex7IEGOrmQkRLnF65T4Sije4g4kwjdZqbs5YBZKw== X-Spam-Score: -2.86 X-Migadu-Queue-Id: C51A83800E Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.86 X-TUID: PoX73dAkOoue Hi! I'm not entirely sure why this exact error pops up, but i think this might render a nice opportunity for a small Guix shell/environment feature! I have created a simplistic patch, unfortunately that does not seem to work -- which puzzles me somewhat. What else is needed to add a user to a group in a guix shell container? On the *nix systems i'm acquainted with there was nothing more to it than adding the correct entry in /etc/group and logging in (again). What am i missing in the context of Guix containers? Though my patch is not ready (or working) i attach it below. g >From ad84a3e73bf86e89c7a8a167111e5bca5821f021 Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Sun, 8 Jan 2023 12:08:30 +0100 Subject: [PATCH] scripts: environment: Add "audio" group to the shell container user * guix/scripts/environment.scm [launch-environment/container]: Add an entry for "audio" in /etc/group. --- guix/scripts/environment.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index c7fd8fd340..f2fae6f1f8 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -748,6 +748,9 @@ (define fhs-mappings (string-append "/home/" user) (passwd:dir pwd)))))) (groups (list (group-entry (name "users") (gid gid)) + (group-entry (name "audio") + (gid (+ 1 gid)) + (members (list (number->string uid)))) (group-entry (gid 65534) ;the overflow GID (name "overflow")))) (home-dir (password-entry-directory passwd)) -- 2.38.1