From unknown Sun Jun 15 08:04:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#56439 <56439@debbugs.gnu.org> To: bug#56439 <56439@debbugs.gnu.org> Subject: Status: [PATCH] gnu: home: Add Guix channels service. Reply-To: bug#56439 <56439@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:04:49 +0000 retitle 56439 [PATCH] gnu: home: Add Guix channels service. reassign 56439 guix-patches submitter 56439 Reily Siegel severity 56439 normal tag 56439 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 07 11:33:57 2022 Received: (at submit) by debbugs.gnu.org; 7 Jul 2022 15:33:57 +0000 Received: from localhost ([127.0.0.1]:57656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9TVs-0006Zg-Vq for submit@debbugs.gnu.org; Thu, 07 Jul 2022 11:33:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:43182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9TVr-0006ZY-4A for submit@debbugs.gnu.org; Thu, 07 Jul 2022 11:33:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9TVq-0007yZ-Hv for guix-patches@gnu.org; Thu, 07 Jul 2022 11:33:54 -0400 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:55206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1o9TVl-0000ek-GF for guix-patches@gnu.org; Thu, 07 Jul 2022 11:33:54 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Lf0n161LCz9sq1 for ; Thu, 7 Jul 2022 17:33:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reilysiegel.com; s=MBO0001; t=1657208021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvGK+2bRDHBu+bFTYkTq7ougQKQ9iu0NAFY52V1FZ0Q=; b=gl30O15UXQo0JAzQcSW4Uk5yeNS5HqMHgl7lbyInpd4FhW7Vyu8Dq+BEavyTveUZDODUe2 wX0ogSg2wRIBhhCktJtdCX3Nrfj1y3eBh0DoIuBfFDEJ/PjfrmibtoomIbo4PUr2N16mbW eiqu8vkUfw3z32lDnvLsrRqHZzzJEVGpkXDRjM0/a0R9aQKlFEYFKLrn/HX5XL1/omGROG uNRR162hS/8O+huxDrqiEA5Hm4XCghoFc8nHB7hMZX7RckE3bTHacGJhU9/7PNt+ZxMvVO WXe3T4WsSOK73Zvpq3HSaqgoB3mR9ziymdE0V1jRSYlyXgVNUSj7lf4WVc2FLg== From: Reily Siegel To: guix-patches@gnu.org Subject: [PATCH] gnu: home: Add Guix channels service. Date: Wed, 29 Jun 2022 17:05:26 -0400 Message-ID: <87let52b07.fsf@reilysiegel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Lf0n161LCz9sq1 Received-SPF: pass client-ip=2001:67c:2050:0:465::101; envelope-from=mail@reilysiegel.com; helo=mout-p-101.mailbox.org X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_96_XX=3.405, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) * gnu/home/services/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. * doc/guix.texi: Add documentation for home-channels-service. --- doc/guix.texi | 32 +++++++++++++++++++++++++++ gnu/home/services/guix.scm | 44 ++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 77 insertions(+) create mode 100644 gnu/home/services/guix.scm diff --git a/doc/guix.texi b/doc/guix.texi index 097e4a362b..b8b3f5cd82 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -105,6 +105,7 @@ Copyright @copyright{} 2022 Aleksandr Vityazev@* Copyright @copyright{} 2022 Philip M@sup{c}Grath@* Copyright @copyright{} 2022 Karl Hallsby@* Copyright @copyright{} 2022 Justin Veilleux@* +Copyright @copyright{} 2022 Reily Siegel@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -39433,6 +39434,7 @@ services)}. * Shepherd: Shepherd Home Service. Managing User's Daemons. * SSH: Secure Shell. Setting up the secure shell clien= t. * Desktop: Desktop Home Services. Services for graphical environmen= ts. +* Guix: Guix Home Services. Services for Guix. @end menu @c In addition to that Home Services can provide =20 @@ -40073,6 +40075,36 @@ format. =20 @end deftp =20 +@node Guix Home Services +@subsection Guix Home Services + +The @code{(gnu home services guix)} module provides services for +user-specific Guix configuraton. + +@defvr {Scheme Variable} home-channels-service-type +This is the service type for managing +@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controlls the +channels recived on @command{guix pull}. It's associated value is a list +of @code{channel} records, defined in the @code{(guix channels)} module. + +Generally, it is better to extend this service than to directly +configure it, as its default value is the default guix channel(s) +defined by @code{%default-channels}. If you configure this service +directly, be sure to include a guix channel. See @ref{Specifying +Additional Channels} and @ref{Using a Custom Guix Channel} for more +details. + +A typical extension for adding a channel might look like this: + +@lisp +(simple-service 'variant-pacakges-service + home-channels-service-type + (list + (channel + (name 'variant-packages) + (url "https://example.org/variant-packages.git"))) +@end lisp +@end defvr =20 @node Invoking guix home @section Invoking @code{guix home} diff --git a/gnu/home/services/guix.scm b/gnu/home/services/guix.scm new file mode 100644 index 0000000000..428daff1c4 --- /dev/null +++ b/gnu/home/services/guix.scm @@ -0,0 +1,44 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 Reily Siegel +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services guix) + #:use-module (gnu home services) + #:use-module (guix channels) + #:use-module (guix gexp) + #:use-module (ice-9 pretty-print) + #:use-module (srfi srfi-1) + #:export (home-channels-service-type)) + +(define (channels-xdg-files channels) + `(("guix/channels.scm" + ,(plain-file + "channels.scm" + (call-with-output-string + (lambda (port) + (pretty-print (cons 'list (map channel->code channels)) port)))= )))) + +(define home-channels-service-type + (service-type + (name 'home-channels) + (default-value %default-channels) + (compose concatenate) + (extend append) + (extensions + (list (service-extension home-xdg-configuration-files-service-type + channels-xdg-files))) + (description "Manages $XDG_CONFIG_HOME/guix/channels.scm"))) diff --git a/gnu/local.mk b/gnu/local.mk index faad6cc6b2..65891cb8ea 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -83,6 +83,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/home/services/desktop.scm \ %D%/home/services/symlink-manager.scm \ %D%/home/services/fontutils.scm \ + %D%/home/services/guix.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ %D%/home/services/ssh.scm \ --=20 Reily Siegel From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 08 02:54:56 2022 Received: (at 56439) by debbugs.gnu.org; 8 Jul 2022 06:54:56 +0000 Received: from localhost ([127.0.0.1]:58596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9htA-0003fT-1n for submit@debbugs.gnu.org; Fri, 08 Jul 2022 02:54:56 -0400 Received: from knopi.disroot.org ([178.21.23.139]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9ht9-0003fK-3s for 56439@debbugs.gnu.org; Fri, 08 Jul 2022 02:54:55 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5432841D37; Fri, 8 Jul 2022 08:54:54 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M0xAtBkvnBhd; Fri, 8 Jul 2022 08:54:53 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657263293; bh=OvigjtvgULVduryhcQsVkYaBVat5/fBE6s5tjVJAp8Y=; h=Date:Subject:From:To:References:In-Reply-To; b=LZerYU8IEmaqHIjy+Ir+Re8m53QGQvc99hjcZl3SUKll550RS8C5W4tVR/1Q5J6tC j/ojqNk9y/hhyzuXq1o4s+sMWkhOUehgu8FE8Feid7d1I2uGpj+GazjKWD9XeMXhZG 719NuwzDEZvl+asX4tLhXiGO3t/Kg239ZctNjV37VCpVH8VaA9Y5ITqDAeyQ5Zgn4m bNaaIqjBvFHEho1S4XqPs8kUOXZYO+4eRSbvKJLKm76hzveVrqiUfeey53nF8xTleS 6AWtSKMKmZRZLT8728A9FEbuTuevtZvNskvP9cnDp+M6paihNV+5Q6/dNL73xZtIgO /6ZWPeNVxqkDA== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 08 Jul 2022 07:54:05 +0100 Message-Id: Subject: Re: [bug#56439] [PATCH] gnu: home: Add Guix channels service. From: "(" To: "Reily Siegel" , <56439@debbugs.gnu.org> References: <87let52b07.fsf@reilysiegel.com> In-Reply-To: <87let52b07.fsf@reilysiegel.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56439 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) LGTM, except a few typos: On Wed Jun 29, 2022 at 10:05 PM BST, Reily Siegel wrote: > +The @code{(gnu home services guix)} module provides services for > +user-specific Guix configuraton. configuraton -> configuration > +@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controlls the controlls -> controls > +channels recived on @command{guix pull}. It's associated value is a list recived -> recieved, and possibly It's -> Its > +A typical extension for adding a channel might look like this: > + > +@lisp > +(simple-service 'variant-pacakges-service pacakges -> packages > + (description "Manages $XDG_CONFIG_HOME/guix/channels.scm"))) Maybe change this to something like "Manages the per-user Guix channels specification"? -- ( From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 08:59:09 2022 Received: (at 56439) by debbugs.gnu.org; 11 Jul 2022 12:59:09 +0000 Received: from localhost ([127.0.0.1]:38781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAt0H-00055i-4T for submit@debbugs.gnu.org; Mon, 11 Jul 2022 08:59:09 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:52916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAt05-00054q-G6 for 56439@debbugs.gnu.org; Mon, 11 Jul 2022 08:59:03 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LhP8S4CbRz9sVt for <56439@debbugs.gnu.org>; Mon, 11 Jul 2022 14:58:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reilysiegel.com; s=MBO0001; t=1657544328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yyl6SNcAt5s97WRnI1IckLvoUO6Gc7Ilxp6xV0hLC8A=; b=y3nrOpvQ+ch76ddtFdqTVgvbpqpZVW0hLMRsCNcEYF1Kd+2BNZAwcGq0qMJY+tFbWnSIWe 9vb9UXE7ZfqhIYT+0ZAc/DacRyE99t3JNEv7KV1z3MPWpMFt1/YUXZx3ZCn5KnzLepfIii GTZa57TiUVqCO1Y6dWsxkoGQLzJE7gLoDJL4JAC7mTMR+hLej3uzg15HFkvkkdGfjFX94J Ol8a8RGH6yYsO5n1D819OeD1DOP8fVugUP+RpwYK76C0OohHWdExLVaodF+3YCVQa4Umxx ne/26JvG7YfUhNbJUjqTzQNGUSKIRgaI0KCLike4cprkbvEkQaXxDmA8AbGF0g== From: Reily Siegel To: 56439@debbugs.gnu.org Subject: [PATCH v2] gnu: home: Add Guix channels service. Date: Wed, 29 Jun 2022 17:05:26 -0400 Message-ID: <87y1wzn6v3.fsf@reilysiegel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4LhP8S4CbRz9sVt X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. * doc/guix.texi: Add documentation for home-channels-service. --- doc/guix.texi | 32 ++++++++++++++++++++++++ [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -0.0 SPF_PASS SPF: sender matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 56439 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.4 (/) * gnu/home/services/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. * doc/guix.texi: Add documentation for home-channels-service. --- doc/guix.texi | 32 +++++++++++++++++++++++++++ gnu/home/services/guix.scm | 44 ++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 77 insertions(+) create mode 100644 gnu/home/services/guix.scm diff --git a/doc/guix.texi b/doc/guix.texi index 097e4a362b..f3e6cca266 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -105,6 +105,7 @@ Copyright @copyright{} 2022 Aleksandr Vityazev@* Copyright @copyright{} 2022 Philip M@sup{c}Grath@* Copyright @copyright{} 2022 Karl Hallsby@* Copyright @copyright{} 2022 Justin Veilleux@* +Copyright @copyright{} 2022 Reily Siegel@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -39433,6 +39434,7 @@ services)}. * Shepherd: Shepherd Home Service. Managing User's Daemons. * SSH: Secure Shell. Setting up the secure shell clien= t. * Desktop: Desktop Home Services. Services for graphical environmen= ts. +* Guix: Guix Home Services. Services for Guix. @end menu @c In addition to that Home Services can provide =20 @@ -40073,6 +40075,36 @@ format. =20 @end deftp =20 +@node Guix Home Services +@subsection Guix Home Services + +The @code{(gnu home services guix)} module provides services for +user-specific Guix configuraton. + +@defvr {Scheme Variable} home-channels-service-type +This is the service type for managing +@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controls the +channels recieved on @command{guix pull}. Its associated value is a list +of @code{channel} records, defined in the @code{(guix channels)} module. + +Generally, it is better to extend this service than to directly +configure it, as its default value is the default guix channel(s) +defined by @code{%default-channels}. If you configure this service +directly, be sure to include a guix channel. See @ref{Specifying +Additional Channels} and @ref{Using a Custom Guix Channel} for more +details. + +A typical extension for adding a channel might look like this: + +@lisp +(simple-service 'variant-packages-service + home-channels-service-type + (list + (channel + (name 'variant-packages) + (url "https://example.org/variant-packages.git"))) +@end lisp +@end defvr =20 @node Invoking guix home @section Invoking @code{guix home} diff --git a/gnu/home/services/guix.scm b/gnu/home/services/guix.scm new file mode 100644 index 0000000000..819b20b6c9 --- /dev/null +++ b/gnu/home/services/guix.scm @@ -0,0 +1,44 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 Reily Siegel +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services guix) + #:use-module (gnu home services) + #:use-module (guix channels) + #:use-module (guix gexp) + #:use-module (ice-9 pretty-print) + #:use-module (srfi srfi-1) + #:export (home-channels-service-type)) + +(define (channels-xdg-files channels) + `(("guix/channels.scm" + ,(plain-file + "channels.scm" + (call-with-output-string + (lambda (port) + (pretty-print (cons 'list (map channel->code channels)) port)))= )))) + +(define home-channels-service-type + (service-type + (name 'home-channels) + (default-value %default-channels) + (compose concatenate) + (extend append) + (extensions + (list (service-extension home-xdg-configuration-files-service-type + channels-xdg-files))) + (description "Manages the per-user Guix channels specification."))) diff --git a/gnu/local.mk b/gnu/local.mk index 2516562ea4..b5863b1ec8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -83,6 +83,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/home/services/desktop.scm \ %D%/home/services/symlink-manager.scm \ %D%/home/services/fontutils.scm \ + %D%/home/services/guix.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ %D%/home/services/ssh.scm \ --=20 Reily Siegel From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 09:02:13 2022 Received: (at 56439) by debbugs.gnu.org; 11 Jul 2022 13:02:13 +0000 Received: from localhost ([127.0.0.1]:38790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAt3E-00075N-Ad for submit@debbugs.gnu.org; Mon, 11 Jul 2022 09:02:12 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:52918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAt3B-0006zS-Tm for 56439@debbugs.gnu.org; Mon, 11 Jul 2022 09:02:10 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4LhPDB3Vcnz9sV8 for <56439@debbugs.gnu.org>; Mon, 11 Jul 2022 15:02:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reilysiegel.com; s=MBO0001; t=1657544522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NK7ZlnWy7zFXvOSJfEo1OYzrl13KkUymJxy6odPyARE=; b=Nms/Q5T/N3eOIsHYRO3Qqcu3hBW5ZY11aLKaFl4V2JLVtfTzLv2CoyfcVU4uB6lAtUgd/r zk7OvMXIkarm/iz5irm0I3JoPiU+ds4Hx6pGvgLKSKtd+VGohc+dZoKL+0/9DtKHunX8M2 +hRwK+ulGicSozUB9vHWUgJAN+FTrBFQnRMw7KYdfasf+2Yw44QqnaHW4x3q89D+nc36e9 03SeHKdK+rtVf0RT6S+o2lYQjF3TTnsnVq6yqhnmOC0UcIYVb+nab0gTJEXOR6LxWQjiu+ VLeMnbq8RNl55Ec7yFdbztG0DCzv9Ss+MZ/fTF6um8lQZ4CWqwWx4ZpmNJ2T4g== From: Reily Siegel To: 56439@debbugs.gnu.org Subject: [PATCH v3] gnu: home: Add Guix channels service. Date: Wed, 29 Jun 2022 17:05:26 -0400 Message-ID: <87v8s3n6pj.fsf@reilysiegel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4LhPDB3Vcnz9sV8 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home/services/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. * doc/guix.texi: Add documentation for home-channels-service. --- doc/guix.texi | 32 ++++++++++++++++++++++++ [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 56439 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.4 (/) * gnu/home/services/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. * doc/guix.texi: Add documentation for home-channels-service. --- doc/guix.texi | 32 +++++++++++++++++++++++++++ gnu/home/services/guix.scm | 44 ++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 77 insertions(+) create mode 100644 gnu/home/services/guix.scm diff --git a/doc/guix.texi b/doc/guix.texi index 097e4a362b..1f49d9bd6a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -105,6 +105,7 @@ Copyright @copyright{} 2022 Aleksandr Vityazev@* Copyright @copyright{} 2022 Philip M@sup{c}Grath@* Copyright @copyright{} 2022 Karl Hallsby@* Copyright @copyright{} 2022 Justin Veilleux@* +Copyright @copyright{} 2022 Reily Siegel@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -39433,6 +39434,7 @@ services)}. * Shepherd: Shepherd Home Service. Managing User's Daemons. * SSH: Secure Shell. Setting up the secure shell clien= t. * Desktop: Desktop Home Services. Services for graphical environmen= ts. +* Guix: Guix Home Services. Services for Guix. @end menu @c In addition to that Home Services can provide =20 @@ -40073,6 +40075,36 @@ format. =20 @end deftp =20 +@node Guix Home Services +@subsection Guix Home Services + +The @code{(gnu home services guix)} module provides services for +user-specific Guix configuration. + +@defvr {Scheme Variable} home-channels-service-type +This is the service type for managing +@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controls the +channels recieved on @command{guix pull}. Its associated value is a list +of @code{channel} records, defined in the @code{(guix channels)} module. + +Generally, it is better to extend this service than to directly +configure it, as its default value is the default guix channel(s) +defined by @code{%default-channels}. If you configure this service +directly, be sure to include a guix channel. See @ref{Specifying +Additional Channels} and @ref{Using a Custom Guix Channel} for more +details. + +A typical extension for adding a channel might look like this: + +@lisp +(simple-service 'variant-packages-service + home-channels-service-type + (list + (channel + (name 'variant-packages) + (url "https://example.org/variant-packages.git"))) +@end lisp +@end defvr =20 @node Invoking guix home @section Invoking @code{guix home} diff --git a/gnu/home/services/guix.scm b/gnu/home/services/guix.scm new file mode 100644 index 0000000000..819b20b6c9 --- /dev/null +++ b/gnu/home/services/guix.scm @@ -0,0 +1,44 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 Reily Siegel +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services guix) + #:use-module (gnu home services) + #:use-module (guix channels) + #:use-module (guix gexp) + #:use-module (ice-9 pretty-print) + #:use-module (srfi srfi-1) + #:export (home-channels-service-type)) + +(define (channels-xdg-files channels) + `(("guix/channels.scm" + ,(plain-file + "channels.scm" + (call-with-output-string + (lambda (port) + (pretty-print (cons 'list (map channel->code channels)) port)))= )))) + +(define home-channels-service-type + (service-type + (name 'home-channels) + (default-value %default-channels) + (compose concatenate) + (extend append) + (extensions + (list (service-extension home-xdg-configuration-files-service-type + channels-xdg-files))) + (description "Manages the per-user Guix channels specification."))) diff --git a/gnu/local.mk b/gnu/local.mk index 2516562ea4..b5863b1ec8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -83,6 +83,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/home/services/desktop.scm \ %D%/home/services/symlink-manager.scm \ %D%/home/services/fontutils.scm \ + %D%/home/services/guix.scm \ %D%/home/services/shells.scm \ %D%/home/services/shepherd.scm \ %D%/home/services/ssh.scm \ --=20 Reily Siegel From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 18:07:47 2022 Received: (at 56439-done) by debbugs.gnu.org; 11 Jul 2022 22:07:47 +0000 Received: from localhost ([127.0.0.1]:41160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB1ZC-0004Xo-O6 for submit@debbugs.gnu.org; Mon, 11 Jul 2022 18:07:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB1ZB-0004Xa-IY for 56439-done@debbugs.gnu.org; Mon, 11 Jul 2022 18:07:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB1Z6-0003VU-C1; Mon, 11 Jul 2022 18:07:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=UGB8d6BFwf4CgUfnz06+V5noQ/EsWkiiUc8Bb5B/2cc=; b=khp/SIF34LV0EMs3nRcZ yljmL4K/6Jp3RR4/LXP9GKCZHrfESFVaFbMSYwgb+h+08bE1fGMxzwaULgTXr3VGK/tl9TbzQ9fK6 fPpMeFtR6Endod9ai6ilkeLFZCrdGsE/BhDy66p2pr+mZP2PQlQiLpyyLmwwCqsmzGEPovV0GaTP2 u27DD4TtsJ/g7BaZSfUXtbYuUradfLBUDX5pZEsuYfcm1dtAO3evqkphqwBhQmguB7vM6C6F2XOs1 mTgkzSCcXTiQznw/lQgqo7t1kvyg2zM/9alTv0N1SNfzSZ1U1xMUUpihDlhZRk1HdTBqZLy8D9Eml CaEBwvC+MYxt2g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56996 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB1Z5-0007fm-Ra; Mon, 11 Jul 2022 18:07:40 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Reily Siegel Subject: Re: bug#56439: [PATCH] gnu: home: Add Guix channels service. References: <87let52b07.fsf@reilysiegel.com> <87v8s3n6pj.fsf@reilysiegel.com> Date: Tue, 12 Jul 2022 00:07:38 +0200 In-Reply-To: <87v8s3n6pj.fsf@reilysiegel.com> (Reily Siegel's message of "Wed, 29 Jun 2022 17:05:26 -0400") Message-ID: <87h73ni9qt.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56439-done Cc: 56439-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Reily Siegel skribis: > * gnu/home/services/guix.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm. > * doc/guix.texi: Add documentation for home-channels-service. Neat! Applied with the cosmetic changes below. > +(define (channels-xdg-files channels) > + `(("guix/channels.scm" > + ,(plain-file > + "channels.scm" > + (call-with-output-string > + (lambda (port) > + (pretty-print (cons 'list (map channel->code channels)) port)= )))))) The downside with this approach is that it doesn=E2=80=99t let you have a sophisticated =E2=80=98channels.scm=E2=80=99 file, for instance one that ca= lls =E2=80=98channel-with-substitutes-available=E2=80=99 (info "(guix) Channels= with Substitutes"). All in all, I think that=E2=80=99s an acceptable limitation. Someone willi= ng to write arbitrary code to =E2=80=98channels.scm=E2=80=99 can =E2=80=9Croll th= eir own=E2=80=9D and extend =E2=80=98home-xdg-configuration-files-service-type=E2=80=99 similarly. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 1f49d9bd6a..637a2cf744 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -40083,14 +40083,14 @@ user-specific Guix configuration. @defvr {Scheme Variable} home-channels-service-type This is the service type for managing -@file{$XGG_CONFIG_HOME/guix/channels.scm}, the file which controls the -channels recieved on @command{guix pull}. Its associated value is a list +@file{$XDG_CONFIG_HOME/guix/channels.scm}, the file that controls the +channels recieved on @command{guix pull}. Its associated value is a list of @code{channel} records, defined in the @code{(guix channels)} module. Generally, it is better to extend this service than to directly configure it, as its default value is the default guix channel(s) defined by @code{%default-channels}. If you configure this service -directly, be sure to include a guix channel. See @ref{Specifying +directly, be sure to include a guix channel. @xref{Specifying Additional Channels} and @ref{Using a Custom Guix Channel} for more details. --=-=-=-- From unknown Sun Jun 15 08:04:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 09 Aug 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator