LINUX PICKS AND PANS

Nix This Innovative OS for Its Uninviting Complexity

NixOS is a modern and flexible GNU/Linux-based distribution that is both archaic to install and maddening to set up.

That combination makes NixOS a reach too far for new users. That result may be an unintended consequence for a Linux operating system that is built around a very novel design approach.

It is far more complex than other innovating options such as Qubes Linux, which is designed for heightened security, and rigid Arch Linux distros that lack a graphical user interface for managing installations.

NixOS has been on my shortlist of Linux distros to try for a while, thanks to numerous requests from readers and colleagues. I was not expecting such a challenge after I survived several reviews of Arch Linux, which is notorious for its high difficulty level for manual installation routines based on a command line interface.

If you are not comfortable typing commands into a terminal window, NixOS is not distro you want to try any time soon. NixOS does nothing to dispell the notion that the Linux OS is for advanced computer geeks only. That assessment clearly fits NixOS.

A well-documented set of installation instructions does little to help resolve error messages when typed commands fail to execute. NixOS is not your typical modern Linux distro that installs from a fully functional live session.

Several hours into this trial-and-error manual installation process, I had a basic desktop up and running. I quit there. I had no use for a Linux distro that a was a dog to install, that was minimalistic with its software, and that required lots of hands-on management.

However, your needs might be different. NixOS does offer some high-level advantages not found in more standardized Linux distros.

NixOS Unwrapped

NixOS started as a research project a few years ago and has grown into a functional operating system with a stiff learning curve for managing system services.

NixOS is an independent Linux distribution developed by the NixOS Foundation based in The Netherlands. It runs on the KDE desktop environment but is powered by its own Nix Package Manager. The latest edition is version 18.03, released April 6.

NixOS has an unusual focus: It is aimed at modernizing system configuration management. The entire operating system, including the kernel, applications, system packages and configuration files, is built by the Nix Package Manager.

Nix isolates all its packages from each other. It uses its own file structure process as well. For instance, this distro does not have /bin, /sbin, /lib or /usr directories in its file structure. All packages are kept in /nix/store instead.

Other featured innovations include reliable upgrades, rollbacks, reproducible system configurations, a source-based model with binaries, and multi-user package management.

Declarative Differences

The package manager fully assembles the OS components from the kernel to software applications and system packages. It also creates highly editable configuration files to meet your specifications.

This means you create your own detailed list of what you want installed and enabled.

NixOS does this via a declarative system configuration model. You describe system configuration items in a configuration file. Nix does everything else to build that specified configuration for you.

The declarative model makes upgrading systems more reliable and mishap-proof. The declarative approach makes duplicating configurations for deployment on multiple machines in different locations a snap.

This process makes upgrades and rollbacks non-destructive. The package management operation cannot overwrite packages in the Nix store. Instead, it adds new versions in different paths.

No time window exists in which some files from the old version are active along with some files from the new version causing a system crash. Even better, since Nix does not overwrite packages, the old versions remain after an upgrade. So you can roll back to the old version any time.

Security and Efficiency

NixOS’ unique structure pays off where security is concerned because it does not install packages in universal locations found in other Linux OSes. Instead, Nix puts applications in package-specific directories.

This approach greatly reduces the risk of incomplete dependencies. Compilers do not search in per-package directories. Each package has a unique identifier that captures all its dependencies stored in a cryptographic hash. So with NixOS, packages build correctly on your system because you specified the dependency exactly.

Another advantage is NixOS’ ability to run multiple versions of an application. You can install multiple versions or variants of a package and run them simultaneously. This eliminates DLL conflicts that occur when different applications have dependencies on different versions of the same package. Because of the hashing scheme, different versions of a package end up in different paths in the Nix store.

Since applications do not interfere with each other, you can upgrade or uninstall an application without fear of breaking other applications. In NixOS these operations never destructively update or delete files that are used by other packages.

Multi-User Safety

NixOS might be your ideal solution in an SMB workplace where you have different users working on the same computer. Non-privileged users can install software securely because you assign each user a different profile with a set of packages in the Nix store.

This profile is integrated into the user’s PATH statement. You get two advantages over other Linux distros: One, when a user unknowingly tries to re-install an existing package, the Nix Package Manager does not build or download the attempted installation again. Two, the package manager makes it impossible for a user to inject a Trojan horse into a package other users might access.

Installing NixOS

You cannot just burn the ISO files onto a DVD and boot into a fully functional live session. Nor can you create a VirtualBox session to try out NixOS. Either way, you must partition and run various commands manually for a full installation.

When the NixOS DVD loads, you have a command line prompt on a blank screen. To start the OS’ display system, enter this command: # system ctl start display-managerThat loads NixOS’ desktop shell to give you the limited functionality either to install to a hard drive or a virtual machine. Check the instructions carefully, however. Getting the VirtualBox to load NixOS requires a few additional steps.

After a slight delay, the screen will show a multicolored background with three icons. Each one is a step in the installation process.


NixOS installation essentials

The essentials for installing NixOS are the Web-based user manual, the disk partitioning software, and the Konsole’s Command Line Interface.

Shell of an Install

You will see a basic K Plasma desktop layout with access to menus. The menus let you add widgets to the desktop and the panel, even before you do a full installation.

The Plasma desktop is fully engaged. Otherwise, except for the Firefox Web browser, system tools and the settings controls, NixOS is very minimalistic. You are starting from scratch.


NixOS K Plasma Desktop

The K Plasma Desktop is uncluttered, but its beauty masks the lack of any applications beyond system tools when the installation completes.

Nothing is installed, so no real functionality exists beyond the plasma environment.

Making It Work

First, click on the NixOS Manual icon on the desktop. This is your guide to follow strictly. Nix will open the Firefox Web browser to connect you to the Nix website to load the manual.

The next step is to click on the GParted desktop icon to launch the partition manager. Yes, you must create the partition yourself, even if you are installing to a VM. There is no live session environment for NixOS.

The process involves several typed commands that you can copy from the instruction file and paste into GParted. After you create the partition, you must mount it. Then close the GParted window.

Getting It Ready

Click the Konsole icon on the desktop to open a terminal window so you can create a configuration file. You must do this before you can run the installer.

Copy and paste the basic config commands from the manual instructions into the Konsole’s command line window. Then use the resident text editor, Joe’s Own Editor, from the bottom panel’s Applications / Development menu to open the config file that the Nix Package Manager created. The text editor also appears in the Applications / Utilities menu.

Read through all the lines. Each service or component starts with a pound sign (#) to ignore that command. Delete the # marker for each element you want activated for your installation.

Follow the manual directions closely. You may need to edit the actual contents of the line or add additional directions to hone your configuration requests.

One shortcut is to uncomment (delete the # marker) everything to give you a fully loaded Linux system. You also will have to modify the lines specifying usernames and passwords.

Finishing Up

Now you are ready to run the installer. Use this command:# nixos-installIf all works well, Nix will take its time running through all of the installation building steps. If there are any glitches along the way, Nix will stop and issue an error message.

If this happens, go back to an earlier step to resolve the problem. Then run the Nix installer again.

Adding Software

Reboot the computer. Hopefully, grub works and you will see the log-in screen followed by the K Plasma desktop. Other than the desktop, the Konsole, the settings panel, a Web browser and the Dolphin file manager, no applications are installed.


NixOS installation

Until you take painstaking steps to install each application individually, all the NixOS installation gives you are a settings panel, a menu of sysadmin tools, and attractive background images.

You’ll need to check the instructions manual document to learn how to enter Konsole commands to tell the Nix Package manager what software to install.

Hint: It is not a GUI environment. Be prepared for more CLI exposure.

Bottom Line

I had to keep reminding myself that I was not dealing with an extreme case of Arch Linux instead of GNU/Linux. NixOS is more demanding and definitely not a distro for users with anything less than advanced skills.

To say NixOS comes with a steep learning curve and lots of hands-on overhead is putting it mildly. If you are a typical Linux user who lacks sysadmin training, avoid NixOS like a malware attack hiding in plain sight.

Want to Suggest a Review?

Is there a Linux software application or distro you’d like to suggest for review? Something you love or would like to get to know?

Pleaseemail your ideas to me, and I’ll consider them for a future Linux Picks and Pans column.

And use the Reader Comments feature below to provide your input!

Jack M. Germain has been an ECT News Network reporter since 2003. His main areas of focus are enterprise IT, Linux and open source technologies. He has written numerous reviews of Linux distros and other open source software.Email Jack.

8 Comments

  • I appreciate this article. I was using telegram desktop and on the ghostbsd area, this OS was brought up. I guess one had used it and very much liked it. I had downloaded version 18.09 and was going to try it out and came across your article which helped me make sure if I do try it to have time on my hand. I figured like others that I have installed it would be an easy process. I had installed Arch back in the day but used the easy install guide which was still a lot of steps but at the time was dooable. The one I have not had luck with installing in Gentoo. Since then a lot of the arch based distributions have made the installation easier to install. I AM glad for this article in that it lets me know that I will have steps to do which I have not done in a long time and I can prepare for this so that I can enjoy the experience when I get around to doing it.

  • Hey again!

    First, thanks for undertaking this review. NixOS has so far received very little press, and its novelty unfortunately sometimes manifests as difficulty for reviewers. I’m sorry to hear that your first NixOS installation took hours. When it takes that long to get to the good part (an installed NixOS system with a configuration you can iterate on), it must be hard to enjoy practically exploring what the distro has to offer. 🙁

    > I was not expecting such a challenge after I survived several reviews of Arch Linux, which is notorious for its high difficulty level for manual installation routines based on a command line interface.

    Would you be willing to discuss some of these difficulties with me somehow? I don’t want to take too much of your time, but this is dismaying for me to hear. I’ve never installed Arch Linux before, but NixOS should certainly not be much harder, if at all. I understand that the steps are essentially the same: set up a chroot environment where the partitions you want to end up with are mounted as desired on the installation target, and run one or two commands.

    > NixOS does nothing to dispell the notion that the Linux OS is for advanced computer geeks only. That assessment clearly fits NixOS.

    I don’t think NixOS as a project is trying to say anything about Linux-based operating systems in general, so I guess the first of the sentences just quoted is true, but it feels like you’re accusing NixOS of an implicit elitism here. If the distro itself feels that way to you, please understand that that is not the intent of the community of its users and contributors. If you visit https://discourse.nixos.org or visit #nixos on Freenode, what you’ll find is (in my opinion) a very generous and patient group of people who understand that NixOS has some UX warts and are ready to work with newbies to bring them up to speed. Perhaps newbies uninterested altogether in geekery should start somewhere else, but when it comes to NixOS, _aspiring_ computer geeks are very welcome, as far as I’ve seen.

    > You will see a basic K Plasma desktop layout with access to menus. The menus let you add widgets to the desktop and the panel, even before you do a full installation.
    >
    > The Plasma desktop is fully engaged. Otherwise, except for the Firefox Web browser, system tools and the settings controls, NixOS is very minimalistic. You are starting from scratch.

    Plasma is not an official desktop environment for NixOS, to my knowledge. The configuration file you see during the install process includes enabling it only as an example of how you might choose to configure your system. NixOS includes a whole range of desktop environments ( https://nixos.org/nixos/options.html#desktopmanager+enable ), and none is meaningfully privileged above the others. Plasma is included because it happens to be a popular choice AM ong NixOS users and contributors.

    (Note that changes made to the arrangement of widgets in the graphical installation environment won’t carry over to the installed system.)

    It’s probably not accurate to call NixOS a minimalistic distribution. While Nixpkgs (that’s just the other name for the NixOS package collection) has made recent strides in slimming down its packages, that’s not one of the main focuses of the distro. Packages are not currently as well split-up (separate debug objects, binaries, sources, and docs) as they are on Fedora or Debian, and NixOS does not seek to disable as many optional dependencies as possible in all packages by default, la Gentoo. Users for whom minimalism in packaging is a core value may well be disappointed in NixOS, although we have improved on this front immensely in recent years.

    NixOS as a distro is simply unopinionated about what software you should have installed on your computer, which is what you’ve described (inappropriately, in my opinion) as minimalism here.

    > A well-documented set of installation instructions does little to help resolve error messages when typed commands fail to execute.

    Again, could I convince you to go over some of these errors with me? I think the instructions probably need to be made clearer, if they left you punching in incorrect commands.

    > Several hours into this trial-and-error manual installation process, I had a basic desktop up and running. I quit there.

    🙁

    > The process involves several typed commands that you can copy from the instruction file and paste into GParted.

    ??? is this really a GParted feature? Also, the commands in the instructions are not necessarily intended to be copy/pasteable as a sequence. Could this have been one of the sources of your troubles?

    Finally, thanks for covering NixOS distinguishing features even though a bad installation experience left you too exhausted to really play with them. :-

  • Hi,

    > You cannot just burn the ISO files onto a DVD

    and boot into a fully functional live session.

    Nor can you create a VirtualBox session to try

    out NixOS. Either way, you must partition and

    run various commands manually for a full

    installation.

    Unless I AM misunderstanding, I don’t think this is true. Both ISOs and VirtualBox OVAs are provided from the NixOS website:

    https://nixos.org/nixos/download.html

    • For the sake of quickly comparing the usual burn and run process to what NixOS requires, I may have created the impression that I merely tried to burn the ISO files onto A DVD and boot from the DVD. I erred on the side of brevity. I thought that my comparison was clear. Sorry for creating that wrong impression.

      • I don’t think you really addressed the point of the grandparent (to this one) comment.

        The confusion seems to be in what you mean by fully functional, which is never stated explicitly. My guess from the context of the rest of the review is that what you have in mind when you use the phrase fully functional live session is a live environment which includes all the applications one might use on a locally-installed copy of the OS (e.g., an office suite, graphical archive management tools, a web browser, multimedia applications, and so on).

        If that is what you meant by the phrase, I get it. Many distributions’ installers come with live environments that double as previews of the distro and its vision of the desktop, and I can sympathize with your surprise at a distro whose live installation environment does not. But the words you wrote make it sound as though the live environment is broken (it is not) or the tools in it are insufficient for the purpose of the environment (they are not).

        Some background, before I elaborate on the parentheticals in the last sentence: I decided to give NixOS a try in 2015, after having used Nix as a standalone package manager on top of Ubuntu for a little while. I’ve been using NixOS more or less exclusively on all of my personal computers since shortly thereafter, and I have made some small contributions to the project by submitting upstream little fixes and additions I made for my own use. I’m not anyone important in the NixOS world, and I can’t claim to represent the core developers or the user community. Still, I think I AM well-positioned to clear up some misapprehensions I noticed in this review.

        The purpose of the live environment is very narrow (and not explicitly stated anywhere in the environment a splash/landing page would be nice for us to have after the GUI boots up), which I think you did note (if indirectly) throughout the review. NixOS installation essentially boils down to:
        partitioning the disk and mounting the partitions
        writing up what you want on the system
        running `nixos-install`

        The purpose of the graphical live environment is to allow users who prefer tools like GParted or KDE’s Partition Manager over CLI/TUI equivalents like `fdisk` and `parted` to use those tools without having to deal with installing Xorg (and maybe a desktop environment) on the live environment at install time. It’s not supposed to represent some NixOS vision of the desktop or constitute a celebration of minimalist values we just don’t have an installer with an integrated partitioning tool, and we give users a choice of partitioning tools that ranges across graphical and non-graphical options. (Something similar goes for graphical and console-based text editors.)

        All that said, I think it would be more fair and more clear for you to say that the NixOS install media does not come with any extra tools beyond those needed for installation (graphical or otherwise) rather than that it is not fully functional. Alternatively, briefly and explicitly stating that you have a notion of general-purpose desktop computer use in mind (rather than the installation media’s own intended use case) when you say fully functional, would be helpful.

        PS: I wonder what experience you had with the VirtualBox image (perhaps there was an unresolved bug at the time this review was written?) I downloaded the current OVA for NixOS 18.03 just now to test it out and it ran without a hitch. It’s a system with a GUI, ready to go without any partitioning or OS installation. It does not come with much on it, that is true. And very unfortunately, the `/etc/nixos/configuration.nix` file which comes on it doesn’t include any examples configuration options, unlike the example file that `nixos-generate-config` copies to the installation target for users who install the OS themselves. But the provided OVA is a working starting point you can use to get a feel for NixOS and start configuring the operating system without dealing with installation. I hope it was working at the time you played with NixOS in order to write the review. 🙁

        I have a few more thoughts on your review (and I hope you can stand to read them, after so many words from me!), but I think it would be more appropriate to address them in a top-level comment than here.

        Patrick

        • I would even say, that the bare live-CD-system shows the strength of NIXOS: If you want to use a program, just install it.
          The system tries to give the control over the installation to the user. That means a very spartan system when you start, but it’s easy to extend as you like (without root privileges).

  • I read, and then re-read your entire article.

    When I get through with this comment, I’m going to read it again.

    Thank you for your clear exposition of ALL the characteristics of this OS. It seems to me that this a cross between a UNIX, with its inherent flexibility; an real Arch; and a KNOPPIX–all tied together with KDE.

    Along with very assiduously pointing out most of the negatives of this distro–having ONLY to do with ease-of-use, as far as I can determine–you have detailed EXACTLY why this has the potential for being a great distro choice.

    If the creators are determined, and polish the usability aspect, this looks like a very solid choice for a lot of people.

    What a great piece of tech writing and review, and obvious hard work on your part. Please keep up the outstanding work.

    • Wormwood, thank you for your comments and your interest in our LinuxInsider reviews. I AM pleased that my work hit its mark. Best wishes and continnued success in using the Linux OS.

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

LinuxInsider Channels