Installing Guix on a ThinkPad X1 Carbon 5th Gen

I've installed Guix on a ThinkPad X1 Carbon 5th Gen, as an experiment. These are my notes on the installation.

The installation follows the blog and video made by Thanos Apollo. The difference is that I went for full disk encryption.

Apollo uses the nonguix system install disk available here: https://gitlab.com/nonguix/nonguix/-/releases

The current version is: https://substitutes.nonguix.org/nonguix-system-install-1.4.0.x86_64-linux.iso

Thanos advises to first follow the 'easy' installation steps. This is by using the "Graphical install using a terminal based interface".

Once the disk partitioning is done, Thanis switches to the "Install using the shell based process." He then explains what change are needed to /mnt/etc/config.scm, and shows how to create /mnt/etc/channels.scm to access the nonguix software.

To use full disk encryption; two extra steps are needed before you make. You must open the encryted partition and mount it, and you must mount the efi partition.

If you already don't remember what your encrypted disk is, use bklid.

Use the same target name as is listed in the config.scm that Guix automatically generated, most likely it is 'cryptroot'.

Here is the relevant part of config.scm:

 (bootloader (bootloader-configuration
                (bootloader grub-efi-bootloader)
                (targets (list "/boot/efi"))
                (keyboard-layout keyboard-layout)))
  (mapped-devices (list (mapped-device
                          (source (uuid
                                   "75t5sn7j-5o4x-3r91-1noo-14w6sx87syq9e"))
                          (target "cryptroot")
                          (type luks-device-mapping))))

In my case the command was:

 cryptsetup luksOpen /dev/nvme1p2 cryptroot

followed by

 mount /dev/mapper/cryproot /mnt
 mount /dev/nvme1p1 /mnt/boot/efi

and follow the instructions in the video to

use guix shell to install emacs-no-x

use emacs to launch an eshell, from which you

git clone https://gitlab.com/nonguix/noguix

Use the resulting Readme file to create /mnt/etc/channels.scm

and adapt /mnt/etc/config.scm

start the:

  herd start cow-store

and run the installation:

  guix time-machine -C /mnt/etc/channels.scm -- system init /mnt/etc/config.scm /mnt

I also read this blog post by Dave Thompson, where he describes his installation of Guix on a Thinkpad X1 Carbon 10th Gen.