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


SeerLite <seerlite@disroot.org> writes:

> `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.

That behavior doesn't make sense to me, but I have accepted it for
now. As I tried to explain in my question, I *had* performed a guix pull
-C ... before attempting to reconfigure the system. However, I think I
only tried to do that from the /root user.

Since then I have tried to pull from the sudo. This did in fact allow
`guix system reconfigure` to run.

> 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.

This /run/current-system folder is interesting. When I searched the Info
pages I saw also that it is related to files stored under
/var/guix. Unfortunately, I was not able to glean the overarching
rationale for these directories.

> 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.

I appreciate this tip.

> 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.

I think it needs to be clarified that this process has to be done from a
*normal* user account in the *wheel* group. It seems the root user
cannot perform this step.

>> 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`

This unnecessary tie in between the system state and a particular user's
software profile was really tripping me up.

> I hope my explanation was helpful!

Thanks!



      reply	other threads:[~2023-03-09 18: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
2023-03-09 17:58   ` Kyle Andrews [this message]

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