SystemCrafters / guix-installer

A GNU Guix installer image with the full Linux kernel!
GNU General Public License v3.0
217 stars 30 forks source link

Bootstrapping channels #7

Open elais opened 3 years ago

elais commented 3 years ago

Right now channels.scm is getting added to /etc/channels.scm which is the wrong location for channels to be recognized IIRC. the correct path is /etc/guix/channels.scm and these can be added like so

(define %guix-channels
  (scheme-file
   "channels.scm"
   #~(cons* (channel
             (name 'nonguix)
             (url "https://gitlab.com/nonguix/nonguix")
             (introduction
              (make-channel-introduction
               "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
               (openpgp-fingerprint
                "2A39 3FFF 68F4 EF7A 3D29  12AF 6F51 20A0 22FB B2D5"))))
            %default-channels)))
...
(services
     (cons*
      ;; Include the channel file so that it can be used during installation
      (extra-special-file "/etc/guix/channels.scm" %guix-channels)
      (operating-system-user-services installation-os)))

Doing it this way eliminates the need for a few lines of bash script or managing a separate channels file. More importantly it adds system-wide guix channels to the correct directory.

daviwil commented 3 years ago

Thanks! Yeah, I wasn't intending for Guix to pick it up from that location, it was just a convenient place to stash the pinned channel file so that it could be used with guix time-machine for the initial installation process and ensure that newer package derivations aren't used (to avoid rebuilding the non-free Linux kernel).

I wonder if I can avoid the guix time-machine step I provided in the installation video if I put the channel file in the right place? I suppose you'd still need to run guix pull first.

elais commented 3 years ago

I wouldn't run guix pull until after the herd start cow-store /mnt step. But yes running guix pull will get everything from the correct channel but If it is too out of date then the pull will fail due to changing dependencies in the underlying guix system.

It's been a while since I set guix up from scratch without another machine on the network to serve substitutes though so your way may be better for fresh installs On Jul 6, 2021, 04:51 -0600, David Wilson @.***>, wrote:

Thanks! Yeah, I wasn't intending for Guix to pick it up from that location, it was just a convenient place to stash the pinned channel file so that it could be used with guix time-machine for the initial installation process and ensure that newer package derivations aren't used (to avoid rebuilding the non-free Linux kernel). I wonder if I can avoid the guix time-machine step I provided in the installation video if I put the channel file in the right place? I suppose you'd still need to run guix pull first. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.