Re: How to make audio devices available with guix shell --container

2023-01-08 Thread Gabriel Wicki
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




Cuirass custom build jobs

2023-01-05 Thread Gabriel Wicki
Hello!


I'm looking for examples on using Cuirass to build whole
operating-system-definitions, system-configurations,
home-environments and similar,
not-classical-software-package-definitions.  I think i was referred to
some examples on IRC #guix but i guess the logging failed for that
timespan -- and i failed to write the relevant details down.

Under "Specifications" the Cuirass info manual mentions (next to
`hello', `guix' and others) `custom', `images' and `manifests' -- i
guess that's what i'm looking for.  Unfortunately i cannot make up what
input these keywords need.

Thank you, kind stranger and fellow hacker for showing me relevant
use-cases that guide me to sustainable insight ;)


gabriel



Professional audio setup (JACK, PipeWire)

2022-03-22 Thread Gabriel Wicki
Hello dear fellow Guix


My wish is simple: i'd love to get back at live-coding audio using
SuperCollider.  Thankfully all the necessities for that intent are
readily available in GNU Guix.  Unfortunately i'm unable to get it to
sound...

SuperCollider needs some layer in between itself and ALSA and it refuses
to work with PulseAudio.  Traditionally that'd been JACK, but as of
recently there have been reports of it working perfectly with PipeWire.
I would love to give that a try, but would also not mind the JACK route.
The problem is none of my attempts have worked so far.

What works: ALSA works fine (i can hear files playing with `aplay -D
mysetup test.wav`), as does PulseAudio.  When i start pipewire i get the
following output:


[W][86737.352484] mod.rtkit| [  module-rtkit.c:  205 translate_error()] 
RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][86737.352557] mod.rtkit| [  module-rtkit.c:  465 set_nice()] could not 
set nice-level to -11: No such file or directory
[W][86737.352950] mod.rtkit| [  module-rtkit.c:  205 translate_error()] 
RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][86737.355742] mod.rtkit| [  module-rtkit.c:  205 translate_error()] 
RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][86737.356146] mod.rtkit| [  module-rtkit.c:  205 translate_error()] 
RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][86737.356162] mod.rtkit| [  module-rtkit.c:  625 impl_acquire_rt()] 
could not make thread realtime: No such file or directory

These are "just" warnings; attempting to play audio results in this
peculiar error message:
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such
file or directory)


My internet searches left me clueless; thus my first question: is anyone
using PipeWire successfully?  I've found a home-service[1] which apparently
makes use of it but i wasn't successful to use it, yet


I am able to run JACK (by invoking `jackd -dalsa -dhw:1,0 -r44100`, the
same output settings that work for the aplay test directly on ALSA), i'm
even able to start the SuperCollider server, play some audio (everything
seems perfect: it connects itself to inputs as well as outputs), but
there's no sound.  Does anybody have a working JACK setup and would mind
giving me pointers on what i'm missing, or maybe share their
configuration?


I really don't mind which route to take, i only want to mess with some
sound on my favorite OS.


I have installed every- and anything i thought could maybe remotely help
to improve my situation (which it of course didn't): alsa-lib,
alsa-plugins, alsa-utils, jack, jack2, pamixer, patchage, pipewire,
pulseaudio, qjackctl, pavucontrol, wireplumber.


My user account is part of the "audio" group which comes with the
following entries in my pam-limits-service:

(pam-limits-entry "@audio" 'both 'rtprio 99)
(pam-limits-entry "@audio" 'both 'memlock 'unlimited)
(pam-limits-entry "@audio" 'hard 'nice -12)



I hope you and your setups are doing finer that me and mine :)

gabriel



[1] https://git.sr.ht/~krevedkokun/dotfiles/home/services/pipewire.scm



Re: `guix pull` fails after fresh install

2021-08-19 Thread Gabriel Wicki
Please ignore my previous message in this thread, i sent the wrong
version...  Here's the right one:


I was able to fix it! Yay


Because this mailing list is a resource for people seeking help I'll
hereby take the liberty to document how I tracked the issue down and
fixed it.


I added a new user to find out if the problem was reproducible and
whether the system was to blame.  This was luckily not the case.
`guix pull` worked for the freshly added user 'test'.  But I found
the following differences: both

/var/guix/profiles/per-user/user/current-guix

and

/home/user/.config/guix/current

were real directories, whereas for the new 'test' user at the
corresponding paths there were symlinks: the former pointing to
current-guix-1-link in the same directory while the latter pointed to
the former.  Also, there is no file called `current-guix-0-link` in
/var/guix/profiles/per-user/user/, but `current-guix` in the same
directory points to that.  I guessed this was most probably causing
the issue.


If I understand correctly guix stores two kinds of of symlinks in
user-profiles (which live in /var/guix/profiles/per-user/):

  1. current-guix-N-link: links to guix profiles (which contain guix
and guix-daemon executables and info files),

  2. guix-profile-N-link: links to package profile generations
(which contain all installed programs including libraries,
executables and documentation)

  and for each of those link-types one special link (current-guix and
guix-profile) pointing to the currently active one of their kind.


My guix-profile links seemed to be fine, but my suspicion grew that
I'd have to replace the aforementioned directories with symlinks to 
the right places.  Only problem: I did't know which is the "right"
current-guix profile to link to.  But since my installation is just
some days old I figured there shouldn't be too much of a difference
between the different guix versions on my machine and just linked to
the one which
/var/guix/profiles/per-user/test/current-guix-0-link
pointed to.


I tested with `guix pull` which worked just fine.  Pleased with the
outcome I happily `guix package upgrade`d my profile.



Re: `guix pull` fails after fresh install

2021-08-19 Thread Gabriel Wicki
I was able to fix it!


Because this mailing list is a resource for people seeking help I'll
feel free to describe how i tracked the issue down and fixed it.


I added a new user (through a change in the system config and `guix
system reconfigure) to figure out if the problem also exists for new
users, and if not, what the differences to my profile were.

and found the following differences:





`guix pull` fails after fresh install

2021-07-18 Thread Gabriel Wicki
Hello Guix Community!


I ran into an issue after freshly installing Guix System.  When logged in
as a normal user, `guix pull` printed the following output:

Migrating profile generations to '/var/guix/profiles/per-user/user'...
guix pull: error: symlink: File exists: 
"/var/guix/profiles/per-user/user/current-guix"


`guix pull` was invoked before by root, but guix has not been called by the
unprivileged user before.


$ ls -l /var/guix/profiles/per-user/user/
total 0
lrwxrwxrwx 1 user users 19 Jul 18 22:13 current-guix -> current-guix-0-link
lrwxrwxrwx 1 user users 19 Jul 18 22:43 guix-profile -> guix-profile-2-link
lrwxrwxrwx 1 user users 51 Jul 18 22:23 guix-profile-1-link -> 
/gnu/store/skvmv3zpzd06pj0jq57m0xjvx0hdjnkr-profile
lrwxrwxrwx 1 user users 51 Jul 18 22:43 guix-profile-2-link -> 
/gnu/store/mzn60p0kd8kiwdj9qqan73664yn6b0s0-profile
-rw-r--r-- 1 user users  0 Jul 18 22:40 guix-profile.lock


I tried:

 * guix gc
 * guix gc -R
 * guix gc --referrers
 * guix gc --verify
 * guix gc --verify=repair

but to no avail.


Should I just delete current-guix?  Link it to my current profile?  Or the
system's profile?


Thanks in advance for your advice,

Gabriel



Re: Booy fails after fresh, successful installation

2021-03-11 Thread Gabriel Wicki
hello

since this is a brand-new machine, i hadn't tried anything before. now
it's happily running kubuntu (without any non-free drivers). which
doesn't make it a linux-libre kernel (afaik), but still.

what's the difference between the installer and the to-be-installed
system? i'd be astonished if they weren't both linux-libre...


On Thu, Mar 11, 2021 at 09:19:17AM +0100, Pierre Neidhardt wrote:
> The installer does not have the same hardware requirements as the booted
> OS, in particular when it comes to graphics.
> 
> -- 
> Pierre Neidhardt
> https://ambrevar.xyz/




signature.asc
Description: PGP signature