unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: SeerLite <seerlite@disroot.org>
To: Kyle Andrews <kyle@posteo.net>
Cc: help-guix@gnu.org
Subject: Re: Mysteries of channel configuration during system reconfigure
Date: Thu, 09 Mar 2023 16:32:35 +0100	[thread overview]
Message-ID: <35cb99042af417705c800729642c0a1a@disroot.org> (raw)
In-Reply-To: <87bkl2mwt6.fsf@posteo.net>

Hi!

On 2023-03-09 03:50, Kyle Andrews wrote:
> One of the selling points in Guix marketing for me is that the system
> configuration should be self contained within /etc/config.scm and
> channels.scm. However, this appears to not be the case. There seems a
> third element hidden away which prevents me from running:
> 
> ```
> guix system reconfigure /etc/config.scm
> ```
> 
> This command errors out:
> 
> ```
> failed to load '/etc/config.scm'
> ...
> no code for module ...
> ```
> 
> At the moment since I am still very early in setting up my new 
> computer,
> I have to type everything so I'm not going to go into more detail than
> that. Suffice to say it doesn't see the modules I need from the extra
> channel. It did see them during the installation otherwise my computer
> would be in a far less usable state than it is.

`sudo guix system reconfigure` and any `guix package` command will (by 
default) use the generation shown in `guix describe`. On first boot, 
this generation _will_ be different from the one you had in the live 
system. This is because the generation is saved at 
~/.config/guix/current on every `guix pull` and that file will be gone 
together with the live system.

You have two options:

1. Get the channels you want correctly set up in 
~/.config/guix/channels.scm and run `guix pull` with your user in the 
running system. IIRC this takes a while because it'll download the whole 
Guix checkout again (the one used to install would have disappeared 
along with the rest of the live system).
2. Run guix pull -C /run/current-system/channels.scm. This will pull the 
exact generation used to build the system. This will also take time.

After either of these you should be able to `sudo guix system 
reconfigure ...` and get your system running as the channels will be 
available again to every guix subcommand.

Note that you could also copy /run/current-system/channels.scm to 
~/.config/guix/channels.scm but you have to be careful remove the commit 
lines, otherwise all your `guix pull`s will pull the exact same commits 
and you'll stay on an outdated system.

Maybe it could be clarified in the manual that another `guix pull` is 
needed after the first boot. Or maybe the installation could be 
optimized so that the checkout is copied from the live system to the 
installed system.

> When I run the following command:
> 
> ```
> guix system describe
> ```
> 
> The addition channel gets listed. How can it be listed yet be unknown 
> to
> the `guix system reconfigure` command?

Because it was indeed the channel and commit the system was built from. 
It has nothing to do with your "current powers". That all depends on 
what generation of Guix you're using AKA what comes up in `guix 
describe`

I hope my explanation was helpful!

SeerLite


  parent reply	other threads:[~2023-03-09 15:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  2:50 Mysteries of channel configuration during system reconfigure Kyle Andrews
2023-03-09  6:46 ` Julien Lepiller
2023-03-11  0:16   ` Kyle Andrews
2023-03-11  8:08     ` Julien Lepiller
2023-03-09 15:12 ` Luis Felipe
2023-03-09 15:37   ` Luis Felipe
2023-03-09 15:32 ` SeerLite [this message]
2023-03-09 17:58   ` Kyle Andrews

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=35cb99042af417705c800729642c0a1a@disroot.org \
    --to=seerlite@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=kyle@posteo.net \
    /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).