help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysteries of channel configuration during system reconfigure


From: SeerLite
Subject: Re: Mysteries of channel configuration during system reconfigure
Date: Thu, 09 Mar 2023 16:32:35 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]