Skip to content

Installing Non-Guix System

· 5 min
guix system

As a heavy emacs user, Guix system seems to be the logical place to rest one’s head in the perpetual distro hop. As an all-or-nothing type guy, I’ve been running NixOS for the better part of a year now, but Guix seems to philosophically align with me. That’s right, forget about pragmatism when you can have ideological purity!

But, as one will very quickly comes to find in installing Guix, the militant push to have everything be free software means that if you are installing this system to anything other than a hardwired desktop running some sort of open source video card or a librebooted ThinkPad from 2008, you will be very quickly out of luck when you want to say, use wifi or run any sort of video encode.

If you have the ability to plug your machine into an ethernet port, then you can install guix without much issue, but - the moment ethernet is inaccessible, you have to do a workaround.

The mitigation? Baking non-guix into an .iso image and installing from that instead.

In this article, I will discuss how I got non-guix installed to my x230 ThinkPad, and the process to get there.

What is non-guix?#

Non-Guix is a repository of proprietary drivers and the mainline linux kernel so that you can run Guix on a system that doesn’t have 100% free hardware (which is essentially every computer these days). You won’t hear about it in the mainline Guix channels as it is ideologically in conflict with what Guix is attempting to do, so it’s a bit of a Fight Club type scenario (you don’t talk about it).

With that being said, nvidia drivers for GPUs, wifi (broadcom and intel), and some other goodies are available within the repo, so all you have to do is add “non-guix” as a channel in your channels.scm:

(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"))))

Building the Non-Guix .iso#

As we previously discussed, you will have a bad time when trying to install a base Guix .iso on your non-freedom respecting hardware. So, we will go ahead and bake a non-guix .iso for you so that you can use wifi to install your new system.

Step One: Get Guix the package manager on your machine#

You will install guix (the package manager) on your machine for this. Congratulations, guix is available on pretty much every linux distribution and MacOS.

Installation instructions can be found here

cd /tmp
wget https://guix.gnu.org/guix-install.sh
chmod +x guix-install.sh
./guix-install.sh

You can then update with guix pull. This will take a bit of time, so go get a coffee and let it run.

Step Two: Bake the .iso#

to your ~/.config/guix/channels.scm file add:

(cons*
(channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"
)
)
)
)
%default-channels
)

and run guix pull once again.

You will also have to clone the non-guix repo locally: git clone https://gitlab.com/nonguix/nonguix.git and then you can finally build the guix system .iso with guix system image --image-type=iso9660 ./nonguix/nongnu/system/install.scm

Again, this will take some time.

You will be given a location in which this .iso exists after building it in the /gnu/store when it finishes. Copy that path for the next step.

Writing to a USB drive#

You can now plug your USB key into your machine and we will burn in the image to the disk and make it bootable with [[https://man7.org/linux/man-pages/man1/dd.1.html][dd]]:

run [[https://linuxhandbook.com/lsblk-command/][lsblk]] to find the location of your plugged in drive, then:

dd if=[Path To Built Image from build command] of=/dev/[USB Drive Name from lsblk] bs=4M status=progress oflag=sync

Congratulations, you now have a bootable non-guix .iso for installation! Reboot your machine and select the usb stick as your boot drive.

Installation#

GRUB boot parameters#

On some of my machines, I had to add “nomodeset” to the boot parameters in GRUB as the screens were smaller than normal. If you don’t do this, you will potentially have a perpetual black screen instead of getting the Guix installer TUI. When the GRUB screen shows up, hit “e” and you will be able to edit the parameters here. Add “nomodeset” to the boot list, and you should be good to roll.#

Install as normal#

You can then install guix as normal with the guided installer, when prompted for wifi connection, you can scan for networks and should be able to connect to your SSID without issue.

You will have to change some of the generated configuration file before installation. Note the + and - lines:

- (use-modules (gnu))
+ (use-modules (gnu)
+ (nongnu packages linux)
+ (nongnu system linux-initrd))
(use-service-modules cups desktop networking ssh xorg)
(operating-system
+ (kernel linux)
+ (initrd microcode-initrd)
+ (firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "Europe/Warsaw")
(keyboard-layout (keyboard-layout "us"))
(host-name "guixpad")
;; The list of user accounts ('root' is implicit).
(users (cons* (user-account
(name "aidan")
(comment "Aidan")
(group "users")
(home-directory "/home/aidan")
(supplementary-groups '("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Below is the list of system services. To search for available
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list (service gnome-desktop-service-type)
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
;; This is the default list of services we
;; are appending to.
%desktop-services))
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
( targets (list "/dev/sda"))
(keyboard-layout keyboard-layout)))
(swap-devices (list (swap-space
(target (uuid
"8204b016-5101-4d32-9aba-f4a7adcb9560")))))
;; The list of file systems that get "mounted". The unique
;; file system identifiers there ("UUIDs") can be obtained
;; by running 'blkid' in a terminal.
(file-systems (cons* (file-system
(mount-point "/")
(device (uuid
"0be89db0-5391-44aa-9251-a87adb3ec25b"
'ext4))
(type "ext4")) %base-file-systems)))

After this, save the file and STOP, you will NOT install normally you will hit Ctrl+Alt+F3 and open a new TTY (scary black screen with a prompt). Hit Enter and type the following:

herd start cow-store /mnt and finally: guix system init /mnt/etc/config.scm /mnt

The system will then install and you will get just one more coffee as you wait. Caffeinated enough yet?

Upon completion, reboot, pull the USB stick, and you will have your new shiny Guix system with wifi driver support available.

Resources#

As always, God bless, and until next time.

If you enjoyed this post, consider Supporting my work, Checking out my book, Working with me, or sending me an Email to tell me what you think.