Ceci est une ancienne révision du document !
For the sixth and final look at some independent Linux distributions, this month we review NixOS, a unique and unusual operating system.
NixOS is entirely built around its own custom package manager, Nix. This not only installs and removes application packages, but also powers some unusual features, including system reversion rollbacks, reliable upgrades, and the ability to run different versions of the same applications side-by-side. It also installs applications for single users in a computer, meaning each user has their own applications.
The Nix package manager is used to build the entire operating system including the applications, system packages, configuration files, and even the Linux kernel itself.
To make this all work, NixOS has a completely new file system organization with all the components isolated to give enhanced reliability and security. The resulting operating system is advertised as being able to create “reproducible, declarative and reliable systems”.
NixOS is basically designed to be a dream operating system for developers, system administrators and people who work in IT security, and seems to be mostly commercially deployed in companies working in those fields. While optimized for these roles, it is a general desktop distribution as well.
Because it is an independent distribution, NixOS is not based on any other Linux distribution. In fact, it is built from scratch using Nix.
So, we know developers love it, but my task was to see if this unusual distribution is suitable for the average desktop Linux user.
Background
NixOS traces its origins back almost 20 years, to 2003, when Eelco Dolstra started the Nix package manager as a PhD research project at Utrecht University in the Netherlands. From those beginnings, it drew in more developers, and on 31 October, 2013, the first public release of the Nix-based operating system was made. Called NixOS 13.10, it adopted the same “year.month” format that Ubuntu uses. That initial release was codenamed “Aardvark”, and each release since then has been in alphabetical order and carried the name of an animal. Unlike Ubuntu, there are no adjectives, though.
The current release is 21.11, out on 30 November, 2021, and codenamed “Porcupine”, is the 16th release.
NixOS has grown so that it now has a foundation backing it, the NixOS Foundation. It has the NixCon series of developer conventions, regional meetups, community-organized teams for security, infrastructure, convention, marketing, platform moderation and much more. The 21.11 release had 1,541 developers contribute to it, so the project is now fairly big and quite well organized.
There are also a dozen companies that provide commercial support for NixOS enterprise deployments.
Despite its radically different file system focused on isolating applications and processes, it does superficially have the basic and familiar Linux file system organization, but the directories are all redirects to the underlying new system.
The only package manager is Nix, so there is no APT or similar available. The Nix repositories have over 80,000 application files, all in its unique format, so just about every Linux application is there.
NixOS is available in three basic forms. There is a “minimal ISO image” which has no graphical interface, and two desktop versions with Gnome and KDE. Other desktops, like Xfce, LXDE and LXQt, are available, but as package downloads for installation.
Because the developer emphasis seems to be on the package and file systems, the desktops are unmodified, plain, vanilla versions.
Getting NixOS
I downloaded the Gnome version of NixOS 21.11 as an ISO file directly from the official website downloads page via https, as there are no bittorrents offered. The Gnome desktop version is 2.1 GB in size, which compares with Ubuntu 21.10 at 2.9 GB.
There are updated builds since the 30 November, 2021 release so that, even though the current version is five months old, it arrives fully updated.
SHA 256 sums are provided, and it is always a good idea to run the test on the download to make sure your ISO file is not corrupted or otherwise compromised.
Installing
I used Ventoy 1.0.72 to put the ISO file on a USB stick. With Ventoy already installed on the stick, this is as easy as just copying and pasting NixOS with the file manager. There is no need to unpack or write the ISO file, as Ventoy takes care of all that on boot-up. As always, Ventoy worked great and I was able to boot up NixOS without issues.
System requirements
NixOS has a lot of documentation on its official website but no minimum system requirements are specified. In one place it does suggest that 4 GB of RAM are recommended to run some specific processes, though.
I tested NixOS out on a nine-year old desktop computer with 6 GB of RAM and a dual-core Intel Core i3 GHz processor, and I can report that it ran without issues.
Trying out NixOS
NixOS boots up to a serious-looking gray wallpaper with the geometric NixOS logo on it. The very minimalist Gnome 41 desktop shows only the top panel, with the date and time, icons for networking, audio volume and shutdown, plus the single menu button marked “Activities”.
Clicking the “Activities” button, or hitting the “super” key (Windows key), takes you to the Gnome main menu – which has the twin desktop selector, an application launcher for “favorites”, an application search bar, and a button that takes you to the two pages of application tiles.
Since NixOS uses unmodified Gnome, the individual application windows have only a “close” button and no “maximize” or “minimize” buttons. A right-click on the window top provides “hide” and “maximize”, though, which provides similar functionality.
The Gnome desktop works as expected, but it is in other areas that NixOS creates a steep learning curve for new users. There is no Gnome Software or other graphical application to use to install and remove applications or run system updates. That has to all be done with Nix and from the command-line with its unique syntax. Nothing you learned using APT will help you here.
So, for example, to install LibreOffice the syntax is:
$ nix-env -iA nixos.libreoffice
The good news is that the official website has a searchable database of applications to install, and actually prompts you with the Nix syntax to use for installation. That is helpful because, while there is a vast quantity of official documentation, it is highly technical and not aimed at beginners or, indeed, non-developers. The upside is that the internet offers up many other people’s take on NixOS user guides.
Some of the cautions on the website are not real confidence-builders either: “please note that NixOS at the moment lacks a nice, user-friendly graphical installer. Therefore this form of installation may not be suitable for novice Linux users.” Consider yourself warned.
There are other oddities too, such as when running a live session from a USB drive, even though the computer is connected to the internet and you can do a terminal ping check that confirms the connection, neither provided web browser will connect. A forum post theorizes that this is apparently for some undocumented, opaque, live-session, security reason.
Compared to more conventional Linux distributions, there is a lot that is new and a lot to learn here to gain reasonable proficiency.
Settings
In keeping with the developer focus on the backend functions, the stock Gnome desktop is provided with very minimal user options. There is one light window theme, plus the accessibility option of high contrast icons, and that is it. A total of 14 wallpapers are provided, or you can use your own. Another oddity is that if you use a wallpaper other than the default gray NixOS logo wallpaper, it disappears from the list. A dive into the file system to usr/share to look for it runs into a dead end in the opaque file system.
The KDE desktop version likely comes with more user options than Gnome does.
Applications
NixOS comes with a moderate collection of application software, almost all from Gnome. This includes: Archive Manager (File Roller) 3.40.0 file archiver Cheese 41.1 webcam application Document Viewer (Evince) 41.3 PDF viewer Document Scanner (Simple Scan) 40.6 optical scanner Firefox 98.0.2 web browser Gnome Calendar 41.0 desktop calendar Gnome Disks 40.0 disk manager Gnome Files (Nautilus) 41.1 file manager Gnome Music 41.0 music player Gnome Photos 40.1 photo manager Gnome Terminal 3.42.1 terminal emulator Gnome System Monitor 40.0 system monitor Gnome Web (Epiphany) 41.2 web browser Gparted 1.3.1 partition editor Image Viewer (Eye of Gnome) 41.0 image viewer Text Editor (gedit) 40.1 text editor Videos (Totem) 3.38.2 movie player
Notably missing from this list is an office suite such as LibreOffice or even a word processor. This is probably just more evidence that NixOS is more intended for developers than regular desktop users. There is also no default bittorrent client. As noted, though, with 80,000 packages to choose from, including LibreOffice and Transmission, it isn’t hard to add what you need for any possible role.
Conclusions
Overall NixOS Gnome 21.11 impresses as serious, neat and elegant. If you are a fan of the unmodified Gnome desktop, then you will find a lot to like here.
The downside of this distribution is the steep learning curve for package management, including updates and the like. No matter which distribution you come from, you will have much to learn to be able to make Nix work well for you on the command-line. The lack of a beginner-level guide is a hindrance or at least creates a high bar for entrance here. You may need to rely on third-party guides on the internet to find the information you need.
If you have a work-related or personal reason to use NixOS, such as enhanced security, packaging isolation, or even if you are just looking for a new Linux challenge, it could be worth the time invested. But, for most average Linux users just seeking a nice, plain, unmodified Gnome desktop distribution, something like Fedora or Debian would be an easier transition and an easier installation too.
External links
Official website: https://nixos.org/