Imagine you are using Arch, happily typing any random terminal commands that you find on the internet. Of course strangers on the internet don’t lie! They are so nice!…. And they didn’t, that command ran right. You run pacman -Syu third time this day as you need the latest and greatest software that humanity has to offer. You reboot only to discover that GRUB is broken once again. Being the noob that you are, you either do not know that you CAN fix it or you are too lazy to do it. You boot into your hardy archiso flash drive and boot into it, reinstalling arch 3rd time this week. (This story is definitely based on a fictional character and not on me).
This is not the only problem with the imperative approach. As you spend time using your OS, no matter which one, bloat definitely starts to build up. The random applications that you installed a while ago and forgot to remove, that one dependency for GIMP that just wouldn’t work unless manually compiled managing to outlive your passion for Photo Editing and many more. There is a reason why modern languages use the declarative approach to manage the dependencies, whether it be through cargo for rust or npm for node, even stupid languages like python have these tools now in the form of poetry, pdm and uv.
Nix, solves all that and more. Imagine defining all the packages you need in one file, managed by possibly the best package manager in software world right now giving you assurance of no dependency hell. Imagine just learning one language and using that to define configs for all the things on your system, from systemd-services to the config of your favourite WM without having to learn their syntax at all! And this will just be the beginning of nix. (Have I told you I like Nix yet?)