From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0MVpBZ/1b2e5vgAA62LTzQ:P1 (envelope-from ) for ; Sat, 28 Dec 2024 12:57:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0MVpBZ/1b2e5vgAA62LTzQ (envelope-from ) for ; Sat, 28 Dec 2024 13:57:03 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=Zt+X1nPk; dkim=pass header.d=wolfsden.cz header.s=mail header.b=WsVMXiQH; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735390623; 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:dkim-signature; bh=QmOUIW6yRNLRftVdCxwoKPZNuOrC0WcTSK/AfnRe5HU=; b=M8w4I98FRxImxdgI0MI0rhE0mcrK/p4ggCEyIvDQws6JPClPxnzBW6ZtKq79hmnQ2o5xkl nI8dmnXCPBiynUbH5fD2+e0Gbv0KSIfhz26vMpn8Lsl5gy0dpVMcvDuXH3h4gBksH1Jrsw Zasu21hMLuouaYoY6WGZyVxpD3/bA/dO6lg+YS15N6hnuo706WADpVe7NhP18LeaCLf2p0 6IVlJMxN3/xKzlOd3aNiwavvjC11oCvVYaf33Q+YlCugZGIH2reTPgBaxnKkCp69JU5UNC GRwsti/Fd9cMSuevIrFfjIPty5agVx13z8Ae/vKle0pyipLVgnF/WFEYJcA6yQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=Zt+X1nPk; dkim=pass header.d=wolfsden.cz header.s=mail header.b=WsVMXiQH; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735390623; a=rsa-sha256; cv=none; b=OgTkTZKxpk7kFxu/rx+1l2UJggV0R+4GiHK2bf3Y+0wRSvaGecW7YSoURxkeYdKLCgab1E GfxmHrrvjxp9tmUJMtvE9AbDVvrF6YQCZb8z+Uml/BOAmfruwIcKBJw3aDSjY7ML8anMAB DAsZhWyfAiVCRmUVmF5a5DVisN1l2fUShyef9owKNxL34pO+VchaCp3q4tWTVuYiyuVg9Q 6/WI0FG+IOcMV3v+X9AJ8XJG+FHWDYrT9ibikeJm8XF6NEY0ZGbxcU616wv87ORulRyznM T3Jl7m5wpYcZJkPqisOYs2eNg/8KRTEFsYTIap6y7p+MS3EtlODA+aNT6p7omw== 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 D877E87276 for ; Sat, 28 Dec 2024 13:57:02 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRWMq-00081j-FV; Sat, 28 Dec 2024 07:56:32 -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 <~@wolfsden.cz>) id 1tRWMo-00081a-IN for guix-devel@gnu.org; Sat, 28 Dec 2024 07:56:30 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tRWMm-0006fe-1f for guix-devel@gnu.org; Sat, 28 Dec 2024 07:56:30 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 6523833ADF9; Sat, 28 Dec 2024 12:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1735390585; bh=anBp+6UFNJzQhnmgygAUfFxdnvOzU7bvfPIIFtwts/s=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Zt+X1nPkDjAcdaGhiQR8WL5Y8Z4Z0+6DZ26KedgmDNq1GhPNW2eNBisTNXDmrUc1j B1jqmE1T13YQ/DJ/zMidhorN20aD2l1tEzN/5chkHsEs2cWQ7BrcVKgl1l8PI5Jv49 qcqxJVCYVIraPPLOUSx9TnpW0s0U+tQQKmA+3BPakTUwmop6pD70fP9nS7CfkmnRxC fEO9QlvYWcSU6KvnAI1S/OYQXsJ3WDntxSQt7I2rXL61sJ3X9n/hCl+msLXfpjEEMu YHwuUQg2fWQbDZYCFegKIc/tbOTh5MsONFYswwRdeSATUYuumg5j4T7aW67DZ45BMh M+c+SwmSzRGDn4W5V9mcm6BTpJvW85GRRQe6RUYPPGT/gr30O/5cgiz23IzHvBmxJT kUBiXnLOFPU3ZbH83tdXe0WjHCTge4oPsX4NBFnQOPWmOxZRQl9PXkViEct457UHmf /RmFRbjAEwjUzFZ82xHMyBVU5I7DDz8FcOoXiCB+7uY5IHSapwg9Q3w0E2MUJqezu1 +f7kR/RVJyEpUyNr9Dla9ZqY9rmSIJXu03NErO/0pIDbgolwTNS7TnI61Lrem8QIxa gVmKhtCyo5u+i4McAKuUwrsFb1DLtJyPG/NwHeSKqLl2FrbDKF59I/FxKaJpY3I0kM eu4creBEP+fe6QaZSJPimFfk= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id CA83E33B0C3; Sat, 28 Dec 2024 12:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1735390583; bh=anBp+6UFNJzQhnmgygAUfFxdnvOzU7bvfPIIFtwts/s=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WsVMXiQHtKAg9SBxvX+HLS/TFlgK3U3GF1ASAY69c6OykZD2ggauPGgKFV6C65aFh jxJJEJde6uhJ9+qw5TnYT0XLaDnGzUY3syOh183/7o/6f0bm7p1w0GWpPFSpqIPktk dznPsYbAZbItJJRcJFC01rweGVIhTmXslbeu+dPhlBCvn2BlGGRThXzhycg9omjmP2 iLH10TJkWKxdI7ySlrLLuMLeSm1Bhg/pKJgk3xTEJdT9DibpFlYT++F+fgL02B1Alz X6g1ogDx/AHDw+7WTOAhZRtRf8Cz0NMrOouEpeo28kJh45DIKbfayJK0Ln29kDnmp6 NhQFZyXnX8wBsztB5joSqQc13O4EC78LC9G8TuN6TgnbRtIb3DnFJa5kvpBQn+p913 tEkbpz/pINrD1i5n6oISe9QgirgSzXORVao1z8zz6iONl3yZu0sUZNEjMg3hlSn9zu KsjgjerwSgeMYPj9xorWRkAKQ1Bam5B2dr+oUbAHYOV7Wfr89c1FHSptQ2TPBn2wDT QHEcVxo9p/Qksga3a+2UsWV20LwYMg3CqR2yIEgyll8X1J1AjSYBof5q87xDuY702F HAGZCkpg6QCmiyTRSUmEn/nymrphXxTp870fjuYqAfeEwzc7RdoApZuujAFQ5MEyLm qsMgGo0LKT/shJlU0TFNyupA= From: Tomas Volf <~@wolfsden.cz> To: 45mg <45mg.writes@gmail.com> Cc: Guix Devel , Christopher Baines , Ian Eure , =?utf-8?B?RnJhbnRpxaFlayBCb2jDocSNZWs=?= Subject: Re: Docs: Clarify use-cases of `guix-for-channels`? In-Reply-To: <87ed1scm8k.fsf@gmail.com> (45mg.writes@gmail.com's message of "Sat, 28 Dec 2024 02:14:51 -0500") References: <8734ibx1op.fsf@gmail.com> <87v7v4290e.fsf@gmail.com> <87h66o4xxg.fsf@wolfsden.cz> <87ed1scm8k.fsf@gmail.com> Mail-Followup-To: 45mg <45mg.writes@gmail.com>, Guix Devel , Christopher Baines , Ian Eure , =?utf-8?B?RnJhbnRpxaFlayBCb2jDocSNZWs=?= Date: Sat, 28 Dec 2024 13:56:23 +0100 Message-ID: <87ttao2cg8.fsf@wolfsden.cz> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -6.25 X-Spam-Score: -6.25 X-Migadu-Queue-Id: D877E87276 X-TUID: FQxLKm8kAa7U --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, 45mg <45mg.writes@gmail.com> writes: > Hi Tomas, > > I finally understand that it's my use of `guix-for-channels` that's > making it pull when I reconfigure. So, my issue is solved by removing > the `(guix)` field from the `(guix-configuration)` form in the > configuration I posted. > > All I was trying to do was specify additional channels in my system > configuration, without having to write anything in > ~/.config/guix/channels.scm (I prefer for everything related to my > system configuration to be tracked by git in a single root-owned > directory). It looks like I only need the `(channels)` field of > `(guix-configuration)` for that. Is that correct? Yes, I believe so. Setting the (channels) field will create /etc/guix/channels.scm file, which, in absence of ~/.config/guix/channels.scm, will be used. > > This would have been obvious to me if I had understood what > `guix-for-channels` is actually /for/ from the start. The only reason I > ended up using it in the first place is that I was reading through > '(guix) Channels' to understand how to configure additional ones, and > then I saw this in '(guix) Customizing the System-Wide Guix': > >> If you=E2=80=99re running Guix System or building system images with it,= maybe >> you will want to customize the system-wide =E2=80=98guix=E2=80=99 it >> provides=E2=80=94specifically, =E2=80=98/run/current-system/profile/bin/= guix=E2=80=99. For >> example, you might want to provide additional channels or to pin its >> revision. >>=20 >> This can be done using the =E2=80=98guix-for-channels=E2=80=99 proced= ure, which >> returns a package for the given channels, and using it as part of your >> operating system configuration, as in this example: >>=20 >> (use-modules (gnu packages package-management) >> (guix channels)) >>=20 >> (define my-channels >> ;; Channels that should be available to >> ;; /run/current-system/profile/bin/guix. >> (append >> (list (channel >> (name 'guix-science) >> (url "https://github.com/guix-science/guix-science") >> (branch "master"))) >> %default-channels)) >>=20 >> (operating-system >> ;; ... >> (services >> ;; Change the package used by 'guix-service-type'. >> (modify-services %base-services >> (guix-service-type >> config =3D> (guix-configuration >> (inherit config) >> (channels my-channels) >> (guix (guix-for-channels my-channels))))))) >>=20 >> The resulting operating system will have both the =E2=80=98guix=E2=80= =99 and the >> =E2=80=98guix-science=E2=80=99 channels visible by default. The =E2=80= =98channels=E2=80=99 field of >> =E2=80=98guix-configuration=E2=80=99 above further ensures that >> =E2=80=98/etc/guix/channels.scm=E2=80=99, which is used by =E2=80=98guix= pull=E2=80=99, specifies the >> same set of channels (*note =E2=80=98channels=E2=80=99 field of =E2=80= =98guix-configuration=E2=80=99: >> guix-configuration-channels.). > > If I had really been paying close attention, I would have noticed > phrasing like '/maybe/ you will want', and realised that using > `guix-for-channels` is /optional/. But since this subsection is under > the 'Channels' section of the manual, which explains the basics of using > channels - and does not provide any other snippet explaining how to > configure channels in the system configuration file - I assumed that the > code snippet quoted above is THE Official Way=E2=84=A2 to configure addit= ional > channels directly in the system configuration, without using > ~/.config/guix/channels.scm; and copied it near-verbatim. > > I think this could be clarified a little, so that other people who are > in a hurry to set things up for the first time don't make the same > mistake as me, and then think that Guix needs an internet connection > just to reconfigure the system. > > I could write a patch to the manual for this. Here's what I'm proposing > to do: > > - Add a snippet to '(guix) Specifying Additional Channels', explaining > how to configure additional channels within the system configuration > file (as per the second paragraph of this message). The (channels) field is fairly new, so it is well possible some documentation might be missing. The suggested addition might be useful, but the thing is, it is not really required. Usually you would use the ~/.config/guix/channels.scm, since guix pull is per user. So it should be clearly stated that (channels) are to be used if you intend to set default channels for every user on the machine. > > - In '(guix) Customizing the System-Wide Guix', explain more clearly > where `guix-for-channels` would be useful. As I understand it, the > main use-case is for fresh system installations where running `guix > pull` would be a hassle, such as on an installer ISO. Are there other > significant use-cases? Sure there are, guix pull is fairly slow operation, so any system that does not have guix pull done as part of normal workflow might benefit from setting the (guix) field to a custom guix (produced for example by guix-for-channels). I set the (guix) field for all systems except my laptop. > Any other reasons why one might want to use it on their main system, > despite the hassle of it pulling every time and not caching the > derivation? There is a workaround[0], however I would not recommend using it on any system that actually guix-pulls. > (We should also document that limitation, unless it's likely to > change in the near future.) However I agree the current limitation should be documented (and so should be bug #74396). Tomas 0: https://wolfsden.cz/blog/post/what-goes-into-guix-shaped-hole.html =2D-=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdv9XcOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wakW5A/+NpWHARUXpHW8gPhAeQBTYh3Fqj7QpaMxn8ec snMRjVRxn/JceoXcnAFgOXYMCFNcDELqYKaQhW+Bk8cLdMLie/BS5dyhJfQ07LeC o755mqC/FxcS0H5UHNonVamqYpsPbR9sM0f+i2PW1jDVk8i/G1y7UjH0S0nok7ui VirBBqQIKIcP2YY2/EhCb25as3ySswsQznUFUqeOD/G9A8pBGKd5nuTDQiOsXhoC 5SLLPd2B1XHHAA58nO0WP9nm8/oehpV2SQa911qc8OK77AzyqXFkNhuY//meWUIO rtefc62neW+xcIUgSnHODKNutZ5pdzZPv3WDHf/M6qC5Fa6e1WHuNznxXxPwy47+ 6mRIPiMvgH0YW3XDQfVBP70GEr2aG/2LQKZkIJow/SSPUxzVk0SChHANe4m1e0LP JYN8C7UNtXyTF+uWD7V16S/0XeiecbtfYGCraVrEaNwj9NZMQrH1REUNCoRmDN0B u+eYQX1rVTHwM7aO4+rGPMKKoOMAD4GYS/Ruw0wyLx951pGKyFIkV0W3I/cwkB5s 4uVteFZelRs/ZXAU1yqWy12I4t/Z8xtbUD03Bi1lJcxp7rWXcHHwzkhz9JDbp6lO xAGTJ1oMrgqmEGxEsrd4WE0CQDOjbIh5O7X9je0S+oVWFDTHiCB5t48CwU0fAB1W Rj1iXUE= =f5hD -----END PGP SIGNATURE----- --=-=-=--