██ ▄█▀ ██▓███
██▄█▒ ▓██░ ██▒
▓███▄░ ▓██░ ██▓▒
▓██ █▄ ▒██▄█▓▒ ▒
▒██▒ █▄▒██▒ ░ ░
▒ ▒▒ ▓▒▒▓▒░ ░ ░
░ ░▒ ▒░░▒ ░
░ ░░ ░ ░░
░ ░
╓ ╖ ═╣ Journal Entry 01: Guix Analysis ╠════════════════════════════════════════════ ╙ ╜
Beyond its fully libre philosophy, what stands out about GNU Guix is how the system behaves in practice after spending most of your time on systems where you change things directly as you go.
GNU Guix is a declarative operating system, where packages, services, and system configurations are stored in a reproducible configuration file. Everything is is specified explicitly, rather than through ad-hoc changes to a system. This approach is in contrast to the common practice on nearly all *NIX distributions, where software is installed directly from the command line.
In other words, Guix is an operating system which lets you define your computer setup in a single file so it can be recreated exactly the same way anytime, instead of changing things manually step by step.
╓ ╖ ═╣ Libre Philosophy ╠═══════════════════════════════════════════════════════════ ╙ ╜
If you are well acquainted with Linux and its derivatives, you may know about NixOS. NixOS achieves the same fundamental goal as GNU Guix: a reproducible, declarative operating system. What makes Guix special is its design philosophy.
Guix adheres to the Free Software Foundation's (FSF) principles of "free software". Richard Stallman, the founder of the FSF, defines "free software" (FOSS, libre) not in terms of price, but in terms of freedom. Free software is software which respects users' freedom to run, study, modify, and redistribute it.
The reason why this is significant is because Guix does not treat free software as an abstract philosophy, but rather as an enforced set of rules baked into the operating system. Guix is designed so that every layer of its system is adhering to a strict set of rules of what can and cannot run.
This means, in practice, Guix will not bend over backward or cut corners when dealing with proprietary packages and dependencies. If a piece of hardware on your laptop -- for example, a WiFi card -- requires a proprietary driver, it may not function at all, unless a free alternative exists.
A useful comparison can be made with a common Linux distribution like Mint, where users are typically offered the open-source Noveau driver by default, but also given the option to install the proprietary NVIDIA driver from a separate repository for improved performance. In Guix, this choice is not presented, as proprietary components are excluded from the default system.
With this in mind, anyone considering using Guix on bare metal should carefully check hardware compatibility beforehand, since its commitment to software freedom can cause severe limitations on out-of-the-box hardware functionality. Richard Stallman perfectly encapsulates what free software is, and why it is important here.
╓ ╖ ═╣ Declarative Configuration ╠══════════════════════════════════════════════════ ╙ ╜
In Guix, the entire operating system is defined in a single configuration file written in Scheme. Scheme is a dialect of the Lisp programming language, which puts an emphasis on simplicity and minimalist design, which harmonizes with the free/libre approach Guix attains to.
The Guix installer will generate a default configuration file and places it under /etc/config.scm:
(use-modules (gnu))
(use-package-modules ...)
(use-service-modules ...)
(operating-system
(host-name ...)
(timezone ...)
(locale ...)
(bootloader ...)
(file-systems ...)
(users ...)
(packages ...)
(services ...))
User accounts, services, packages -- the entire configuration of the operating system -- are declared in this single file. The GNU Guix Reference Manual suggests keeping the configuration file under version control in case of any accidents.
An example of installing a handful of packages is extremely simple, as follows:
(use-modules (gnu))
(operating-system
...
(package(append(list
dwm st dmenu fastfetch
htop cmatrix vim)
%base-packages))
Once you have finished editing your configuration the most important part is to instantiate it -- apply the changes to your system:
sudo guix system reconigure /etc/config.scm
An interesting thing about Guix is that changes to the system are not exactly overwritten. Instead, it keeps a log of all changes, which can be easily accessed. If you wanted to revert back to any previous version of your system, you can easily do so with a single command. This feature is incredibly beneficial in the event you somehow installed a malicious package, entered an incorrect fstab entry, or otherwise broke your installation.
╓ ╖ ═╣ Ephemeral Environments ╠═════════════════════════════════════════════════════ ╙ ╜
More often than not, you may find yourself in a situation where you need to use a tool only once, without wanting to clutter the system with unnecessary packages and their dependencies. This situation becomes even more frustrating when every temporary tool requires modifying the configuration file just to append another entry to the package list.
This is where Guix's ephemeral shell environments becomes useful. Instead of permanently adding a package to the system, Guix can construct a temporary environment, where packages you install only exist for the lifetime of the shell session, disappearing once the session is terminated.
An example of installing a package in a one-off environment is as follows:
guix shell fastfetch
╓ ╖ ═╣ Final Thoughts ╠═════════════════════════════════════════════════════════════ ╙ ╜
GNU Guix is a niche -- yet very cool -- operating system which solves a common pain point, which is the lack of reproducibility in modern operating systems. Albeit, the fully libre approach can come off as hardcore to most people, and is not practical for every day use, especialy if one needs to use particular software.
Because Guix is so utterly commited to free software, its package repository is therefore limited in comparison to popular alternatives, such as the AUR for Arch Linux.
Guix will definitely appeal to those who would like to experiment with the more uncommon Linux distributions and challenge their technical abilities. If you become a Guix user, you become the Libre philsophy.