But why has it suddenly become so popular? NixOS was first released in 2003. Has Nixpkgs finally hit a critical mass that you can build full projects with it? Did documentation just become much better? Did people just exploring more during covid?
[1] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=nix&sort=byPopularity&type=story
- it has to do with DLTs like Cardano adopting Nix.
- influencers like youtubers and podcasters have began talking about it
- migration from IRC to Matrix, so people can discover it more easily
- people who are into functional programming cycles often talk about it, e.g. haskell, lisp, emacs...
- with the raise of Flatpaks and Snaps, people have been talking more often about Nix as an alternative. The same can be said about Docker/containers and is often suggested as alternative
- mainstream Linux distros taking inspiration from NixOS to make their own immutable and atomic OSs: Fedora Silverblue, openSUSE MicroOS, Clear Linux, ...
- since mid 2010s there was some push towards making documentation better for beginners. The official website also got a modern look to be more attractive. So also taking into account nixpkgs is probably good enough for the average user and has a good enough ecosystem around it as well, this all means NixOS has become mature enough for willing/passionate adopters (e.g. Arch users who want the next shiny tech), and who will talk about it in every given opportunity.
Nix with flakes is a game changer, and as flakes become more mature it lowers the bar that much more IMO. I'm now able to bootstrap a new non-nixOS system with home-manager in 2 commands (well technically 3 with the activation) and it only requires `sh` and `curl` (and I assume xcode command line tools):
sh <(curl -L https://nixos.org/nix/install) --daemon
nix build .#homeConfigurations.{computer}.activationPackage --max-jobs auto --cores $(sysctl -n hw.ncpu) && ./result/activate && rm -rf ./result
home-manager also has support for LaunchAgents now which I think makes it a complete package. The experience is very nice. I'm much more inclined to recommend it widely vs before where I hesitated to tell anyone else to adopt it unless I was ready to walk them through things and caveat some parts.