Why NixOS
- Publish Date
NixOS is part of the GNU/Linux operating system family, utilizing the Linux kernel to interact with the computers. There is a wide spectrum of distributions (different OSes) that can fulfill your demand, for example, Debian having a stable upstream server and Arch having a rolling-release one for cutting-edge uses. The traditional way of setting up an operating system can often be summed up into commands and configuration files (dotfiles), the latter ones are spread across different places in the file hierarchy. NixOS opts for a different approach, utilizing a monolithic configuration system to centralize settings; moreover, the system rollback and other features (detached configuration building) guarantee the immutability of a NixOS system. On the opposite side of the spectrum, NixOS also offers independent environments isolated from the core configs similar to Docker containers.
Forked Packages?
In other operating systems, you can mask the upstream server with your custom sources to use modified packages. In NixOS, you can use overlays to control this behavior without changing your upstream. If you want to share this package with others, you can create a flake for it and share it on a SVN server.
Managing Project Dependencies?
When developing the Temporal Operating System on NixOS, I had to manually build a cross-compiler from source. In the flake, the sources for gcc and binutils had been declared; with some additional configurations pertinent to the parameters of Makefile, the toolchain could be built easily.
Issues of NixOS
-
You have to use some subordinate building system for your configurations to avoid long rebuild duration, such as Home Manager, after your core configs have grown inevitably large.
-
NixOS does not respect your build flag for C/C++ projects unless you specify that hardening flags should be disabled. This could be troublesome for building unsafe projects like GCC.