From d9190abbd20f15ea5b55abdd51e1376f05055850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 12 Nov 2023 22:47:43 +0100 Subject: gexp: Add compiler for . * guix/gexp.scm (gexp-input-compiler): New procedure. * tests/gexp.scm ("gexp references non-existent output") ("gexp-input, as first-class input"): New tests. * doc/guix.texi (G-Expressions): Document it. Reviewed-by: Maxim Cournoyer Change-Id: I95b58d6e4d77a54364026b4324fbb00125a9402e --- doc/guix.texi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index b742a3d5b2..a760d627eb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12197,6 +12197,11 @@ This is like the form above, but referring explicitly to the @var{output} of @var{obj}---this is useful when @var{obj} produces multiple outputs (@pxref{Packages with Multiple Outputs}). +Sometimes a gexp unconditionally refers to the @code{"out"} output, but +the user of that gexp would still like to insert a reference to another +output. The @code{gexp-input} procedure aims to address that. +@xref{gexp-input}. + @item #+@var{obj} @itemx #+@var{obj}:output @itemx (ungexp-native @var{obj}) @@ -12590,6 +12595,39 @@ The example above returns an object that corresponds to the i686 build of Coreutils, regardless of the current value of @code{%current-system}. @end defmac +@anchor{gexp-input} +@deffn {Procedure} gexp-input @var{obj} [@var{output}] [#:native? #f] +Return a @dfn{gexp input} record for the given @var{output} of file-like +object @var{obj}, with @code{#:native?} determining whether this is a +native reference (as with @code{ungexp-native}) or not. + +This procedure is helpful when you want to pass a reference to a +specific output of an object to some procedure that may not know about +that output. For example, assume you have this procedure, which takes +one file-like object: + +@lisp +(define (make-symlink target) + (computed-file "the-symlink" + #~(symlink #$target #$output))) +@end lisp + +Here @code{make-symlink} can only ever refer to the default output of +@var{target}---the @code{"out"} output (@pxref{Packages with Multiple +Outputs}). To have it refer to, say, the @code{"lib"} output of the +@code{hwloc} package, you can call it like so: + +@lisp +(make-symlink (gexp-input hwloc "lib")) +@end lisp + +You can also compose it like any other file-like object: + +@lisp +(make-symlink + (file-append (gexp-input hwloc "lib") "/lib/libhwloc.so")) +@end lisp +@end deffn Of course, in addition to gexps embedded in ``host'' code, there are also modules containing build tools. To make it clear that they are -- cgit v1.2.3 From 11a454f9dae84cc00b977d164dae764454ecb11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 13 Nov 2023 17:43:29 +0100 Subject: gexp: #:references-graphs accepts and honors records. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/gexp.scm (lower-reference-graphs)[tuple->gexp-input]: Add ‘gexp-input?’ case. (gexp->derivation): Update docstring. * doc/guix.texi (G-Expressions): Adjust accordingly. * tests/gexp.scm ("references-file, non-default output"): New test. Reviewed-by: Maxim Cournoyer Change-Id: I595cb75da0867ab8ab44552887dc06ed1d23315e --- doc/guix.texi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index a760d627eb..f869a6bae4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12314,10 +12314,9 @@ When @var{references-graphs} is true, it must be a list of tuples of one of the following forms: @example -(@var{file-name} @var{package}) -(@var{file-name} @var{package} @var{output}) -(@var{file-name} @var{derivation}) -(@var{file-name} @var{derivation} @var{output}) +(@var{file-name} @var{obj}) +(@var{file-name} @var{obj} @var{output}) +(@var{file-name} @var{gexp-input}) (@var{file-name} @var{store-item}) @end example -- cgit v1.2.3 From cbe64c316dda4307d8ae47ca9f696ff874fb4e28 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 13 Dec 2023 12:48:47 +0000 Subject: services: guix: Remove guix-build-coordinator-queue-builds service. This has been effectively replaced by the bffe. * gnu/services/guix.scm (): Remove record type. (guix-build-coordinator-queue-builds-shepherd-services, guix-build-coordinator-queue-builds-activation, guix-build-coordinator-queue-builds-account): Remove procedures (guix-build-coordinator-queue-builds-service-type): Remove service type. Change-Id: I2a233fb10b12cc9bfddebaa35928b25c243f82a2 --- doc/guix.texi | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index f869a6bae4..76b4eae67f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38763,58 +38763,6 @@ the coordinator database, and is used by the agent to authenticate. @end table @end deftp -The Guix Build Coordinator package contains a script to query an -instance of the Guix Data Service for derivations to build, and then -submit builds for those derivations to the coordinator. The service -type below assists in running this script. This is an additional tool -that may be useful when building derivations contained within an -instance of the Guix Data Service. - -@defvar guix-build-coordinator-queue-builds-service-type -Service type for the -guix-build-coordinator-queue-builds-from-guix-data-service script. Its -value must be a @code{guix-build-coordinator-queue-builds-configuration} -object. -@end defvar - -@deftp {Data Type} guix-build-coordinator-queue-builds-configuration -Data type representing the options to the queue builds from guix data -service script. - -@table @asis -@item @code{package} (default: @code{guix-build-coordinator}) -The Guix Build Coordinator package to use. - -@item @code{user} (default: @code{"guix-build-coordinator-queue-builds"}) -The system user to run the service as. - -@item @code{coordinator} (default: @code{"http://localhost:8746"}) -The URI to use when connecting to the coordinator. - -@item @code{systems} (default: @code{#f}) -The systems for which to fetch derivations to build. - -@item @code{systems-and-targets} (default: @code{#f}) -An association list of system and target pairs for which to fetch -derivations to build. - -@item @code{guix-data-service} (default: @code{"https://data.guix.gnu.org"}) -The Guix Data Service instance from which to query to find out about -derivations to build. - -@item @code{guix-data-service-build-server-id} (default: @code{#f}) -The Guix Data Service build server ID corresponding to the builds being -submitted. Providing this speeds up the submitting of builds as -derivations that have already been submitted can be skipped before -asking the coordinator to build them. - -@item @code{processed-commits-file} (default: @code{"/var/cache/guix-build-coordinator-queue-builds/processed-commits"}) -A file to record which commits have been processed, to avoid needlessly -processing them again if the service is restarted. - -@end table -@end deftp - @subsubheading Guix Data Service The @uref{http://data.guix.gnu.org,Guix Data Service} processes, stores and provides data about GNU Guix. This includes information about -- cgit v1.2.3 From afdbf7f271529573397474fdb8f1c9d00dceba37 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Fri, 22 Dec 2023 10:22:01 -0500 Subject: gnu: home: Add home-pipewire service. This adds a set of home Shepherd services which will start the required services for a functional PipeWire setup. * gnu/home/services/sound.scm (home-pipewire-shepherd-service, home-wireplumber-shepherd-service, home-pipewire-shepherd-services, home-pipewire-asoundrc, home-pipewire-xdg-configuration, home-pipewire-pulseaudio-shepherd-service): New procedures. (home-pipewire-service-type): New service type. (home-pipewire-configuration): New struct. (home-pipewire-disable-pulseaudio-auto-start): New variable. * doc/guix.texi (Sound Home Services): Document it. Change-Id: I99e0ae860de91d459c3c554ec5503bf35f785a2a Signed-off-by: Oleg Pykhalov --- doc/guix.texi | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 76b4eae67f..a9a9272c35 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -45069,6 +45069,7 @@ sound support. @cindex PulseAudio, home service @cindex RTP, for PulseAudio +@subsubheading PulseAudio RTP Streaming Services The following services dynamically reconfigure the @uref{https://pulseaudio.org,PulseAudio sound server}: they let you @@ -45156,6 +45157,77 @@ Stopping the Shepherd service turns off broadcasting. This is the multicast address used by default by the two services above. @end defvar +@cindex PipeWire, home service +@subsubheading PipeWire Home Service + +@uref{https://pipewire.org, PipeWire} provides a low-latency, +graph-based audio and video processing service. In addition to its +native protocol, it can also be used as a replacement for both JACK and +PulseAudio. + +While PipeWire provides the media processing and API, it does not, +directly, know about devices such as sound cards, nor how you might want +to connect applications, hardware, and media processing filters. +Instead, PipeWire relies on a @dfn{session manager} to specify all these +relationships. While you may use any session manager you wish, for most +people the @url{https://pipewire.pages.freedesktop.org/wireplumber/, +WirePlumber} session manager, a reference implementation provided by the +PipeWire project itself, suffices, and that is the one +@code{home-pipewire-service-type} uses. + +PipeWire can be used as a replacement for PulseAudio by setting +@code{enable-pulseaudio?} to @code{#t} in +@code{home-pipewire-configuration}, so that existing PulseAudio clients +may use it without any further configuration. + +In addition, JACK clients may connect to PipeWire by using the +@command{pw-jack} program, which comes with PipeWire. Simply prefix the +command with @command{pw-jack} when you run it, and audio data should go +through PipeWire: + +@example +pw-jack mpv -ao=jack sound-file.wav +@end example + +For more information on PulseAudio emulation, see +@uref{https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PulseAudio}, +for JACK, see +@uref{https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-JACK}. + +As PipeWire does not use @code{dbus} to start its services on demand +(as PulseAudio does), @code{home-pipewire-service-type} uses Shepherd +to start services when logged in, provisioning the @code{pipewire}, +@code{wireplumber}, and, if configured, @code{pipewire-pulseaudio} +services. @xref{Shepherd Home Service}. + +@defvar home-pipewire-service-type +This provides the service definition for @command{pipewire}, which will +run on login. Its value is a @code{home-pipewire-configuration} object. + +To start the service, add it to the @code{service} field of your +@code{home-environment}, such as: + +@lisp +(service home-pipewire-service-type) +@end lisp +@end defvar + +@deftp {Data Type} home-pipewire-configuration +Available @code{home-pipewire-configuration} fields are: + +@table @asis +@item @code{pipewire} (default: @code{pipewire}) (type: file-like) +The PipeWire package to use. + +@item @code{wireplumber} (default: @code{wireplumber}) (type: file-like) +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. +@end table +@end deftp + @node Mail Home Services @subsection Mail Home Services -- cgit v1.2.3 From 7722da6fa5422c4fec69d6c8b9536c7d6fc3d326 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 19 Nov 2023 14:46:52 -0500 Subject: services: laminar: Add configuration option for supplementary groups. * gnu/services/ci ()[supplemental-groups]: New field. (laminar-shepherd-service): Exec laminard with supplementary groups. (laminar-account): Add supplementary groups to laminar user. * doc/guix.texi (Laminar): Document new configuration field. Change-Id: Iebfdbb58ea8c6dfa22bb8f64f6463e3ad133d2f9 --- doc/guix.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index a9a9272c35..bc04bb8150 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -34163,6 +34163,9 @@ The Laminar package to use. @item @code{home-directory} (default: @code{"/var/lib/laminar"}) The directory for job configurations and run directories. +@item @code{supplementary-groups} (default: @code{()}) +Supplementary groups for the Laminar user account. + @item @code{bind-http} (default: @code{"*:8080"}) The interface/port or unix socket on which laminard should listen for incoming connections to the web frontend. -- cgit v1.2.3 From b69bdcf77f8240ba8241be12ba2b0ebd55abcb38 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Dec 2023 23:28:05 -0500 Subject: doc: Fix doc and clarify how to use libvirt as unprivileged user. * doc/guix.texi (Virtualization Services): Document the necessity of being part of the "libvirt" group and augment example. Remove extraneous "(unix-sock-group "libvirt")" from example, as this is now the default value. Update default documented value from "root" to "libvirt". Fixes: https://issues.guix.gnu.org/34611 Reported-by: Brett Gilio Change-Id: I5fe17706f69db55fbd661e0a43115c56d0ffd9a9 --- doc/guix.texi | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index bc04bb8150..3002cdfa13 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35174,17 +35174,24 @@ services. @subsubheading Libvirt daemon @code{libvirtd} is the server side daemon component of the libvirt -virtualization management system. This daemon runs on host servers -and performs required management tasks for virtualized guests. +virtualization management system. This daemon runs on host servers and +performs required management tasks for virtualized guests. To connect +to the libvirt daemon as an unprivileged user, it must be added to the +@samp{libvirt} group, as shown in the example below. @defvar libvirt-service-type This is the type of the @uref{https://libvirt.org, libvirt daemon}. Its value must be a @code{libvirt-configuration}. @lisp +(users (cons (user-account + (name "user") + (group "users") + (supplementary-groups '("libvirt" + "audio" "video" "wheel"))) + %base-user-accounts)) (service libvirt-service-type (libvirt-configuration - (unix-sock-group "libvirt") (tls-port "16555"))) @end lisp @end defvar @@ -35266,7 +35273,7 @@ UNIX domain socket group ownership. This can be used to allow a 'trusted' set of users access to management capabilities without becoming root. -Defaults to @samp{"root"}. +Defaults to @samp{"libvirt"}. @end deftypevr -- cgit v1.2.3