Follow us
Breaking
Tech News

Common mistakes with NixOS for system administrators

NixOS offers a declarative configuration model that eliminates configuration drift, but administrators transitioning from Ubuntu or Arch may struggle with non-free software management and AppImage compatibility.

Share

The configuration hurdle

NixOS builds the entire operating system from a definition in the Nix language, typically found in /etc/nixos/configuration.nix. I recommend NixOS for administrators who want to replicate identical builds across a laptop or a fleet of servers, but I would skip it if you want the simplicity of Ubuntu. This declarative model replaces the manual editing of scattered files found in traditional distributions. Unlike tools like Puppet, Ansible, or Chef, which attempt to reconcile system state after the fact, NixOS integrates configuration management directly into the OS design to eliminate configuration drift. You cannot use a GUI app store to manage packages; instead, you must search search.nixos.org and modify your configuration files.

A common mistake for those replacing Arch or Ubuntu involves the management of non-free software like Chrome, Slack, or Spotify. Even if you include the line nixpkgs.config.allowUnfree = true; in your configuration, the system requires you to manually create the ~/.config/nixpkgs directory to avoid errors. This requirement deviates from the straightforward package management used in other systems. Nix handles package management using a functional approach, a concept established in Eelco Dolstra’s 2006 doctoral thesis. Armijn Hemel created the first NixOS prototype in 2006 as part of his Master’s thesis, NixOS: The Nix Based Operating System. The NixOS Foundation, a Dutch non-profit established in 2015, supports this development.

Filesystem and dependency logic

The distribution does not follow the Linux Standard Base. It places all binaries, kernels, and firmware in the read-only /nix/store, which identifies files using cryptographic hashes of their build inputs. Because /lib and /usr/lib do not exist, AppImage executables cannot run directly because they expect certain libraries to exist on specific paths. You must run these through an interpreter to get them working. The system relies on the Nixpkgs collection to provide a massive selection of packages. While 64-bit x86_64 and ARM64 devices work well, 32-bit x86 architecture support is declining and its cache availability is significantly reduced.

Architecture Support Status
x86_64 Supported
ARM64 Supported
x86 (32-bit) Limited
RISC-V No official support

Additionally, there is no official support for RISC-V devices, and MIPS support is limited to remnants in Nixpkgs. Because the Nix build language specifies how to build all packages from source, the package manager can automatically download pre-built binaries from a substituter to avoid the long and intensive build times associated with source-based models. The nix-shell command allows developers to work with isolated sets of dependencies, which is useful for those working in Python or Go. The nix command provides a redesigned command-line interface intended to replace nix-env and nix-build. Nix recommends a multi-user installation for Linux users running systemd with SELinux disabled. In the Nix store, multiple versions of a package may coexist, which allows different users to have alternate versions of the same package installed in their respective profiles. For 32-bit x86 architectures, the ISO is no longer offered as a ready-built image, although users can build it manually. I find the way NixOS uses symlinks to manage user profiles in /nix/var/nix/profiles to be a logical way to prevent the dependency hell common in other distros. The isolation of these builds ensures that if a package works on one machine, it will also work on another without undeclared dependencies.

Deployment and the rollback workflow

Applying changes requires the nixos-rebuild command to evaluate the configuration and produce a new system generation. This process makes upgrades atomic because a power failure during an update will not leave the system in an inconsistent state. If a new generation fails, you can select an older version from the bootloader menu or use nixos-rebuild switch –rollback to revert. NixOS releases stable versions twice a year, near the ends of May and November, alongside a rolling, unstable release. For deployment, you can use official Amazon EC2 AMIs or burn an ISO image to a USB stick. You can choose between a graphical ISO that includes desktop environments like GNOME or Plasma, or a minimal ISO for server roles.

You already know that managing a system via the command line requires precision, so the shift is the biggest hurdle. I found that after installing an application like LibreOffice with nix-shell -p libreoffice, the program often does not appear in the desktop menu immediately. I had to reboot the machine to see the application in the menu after I finished the installation. Will the developers eventually integrate more automated ways to handle these environment updates? You can even convert existing Linux installations into NixOS using nixos-infect or nixos-in-place. For those on physical hardware, the graphical installation ISO provides a live environment to test the system.

Share

Technewsdaily

Senior tech writer covering AI, gadgets and cybersecurity. Breaking down the news that matters, every day.