From: Gabriel Wicki <gabriel@erlikon.ch>
To: Elias Kueny <elias.kueny@posteo.net>
Cc: help-guix@gnu.org
Subject: Re: How to make audio devices available with guix shell --container
Date: Sun, 08 Jan 2023 12:19:39 +0100 [thread overview]
Message-ID: <87zgattgs4.fsf@erlikon.ch> (raw)
In-Reply-To: <878rjktozq.fsf@posteo.net> (Elias Kueny's message of "Tue, 06 Dec 2022 17:01:17 +0000")
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 <gabriel@erlikon.ch>
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
prev parent reply other threads:[~2023-01-08 11:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 17:41 How to make audio devices available with guix shell --container Elias Kueny
2022-12-06 3:47 ` kiasoc5
2022-12-06 17:01 ` Elias Kueny
2023-01-08 11:19 ` Gabriel Wicki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgattgs4.fsf@erlikon.ch \
--to=gabriel@erlikon.ch \
--cc=elias.kueny@posteo.net \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).