16
Remember the days when everyone and their pet iguana was raving about Arch Linux? You couldn't escape the ever-so-subtle "I use Arch BTW" remarks in every Linux forum. Well, move over, Arch, because NixOS is here to steal your thunder! Nowadays, it seems that you can't browse YouTube or read a blog without stumbling upon someone extolling the virtues of NixOS and how it is the epitome of computing perfection. But hey, who needs critical analysis when we can jump on the hype train and declare NixOS as the new Arch? Because that's exactly what's going on. NixOS has now become the self-proclaimed prodigy that's poised to dethrone Arch Linux as the holy grail of Linux distributions. The time is calling, my friends! It's time for you – the seasoned Linux enthusiast – to dust off your keyboard warrior capes and embark on a new crusade. So, grab your Tux plushie (or, your pitchforks if you belong to the world of devils) and let's embark on an adventure through the enigmatic world of NixOS (and let the memes commence)!
ok so i was setting up nixos, it was going good. there were a lot of docs to setup home manage and nix flakes and they are easy to do once you get some hang of it. But then i wanted to do a small project in c++ where i wanted to use a library libcpr. now you can not directly install that library and use it. (AFAIK). You have to create a flake in that project and then use it. Which BTW is the right way to do it. But also i just want to test run a 4 line code.
To achieve that you either have to do shell.nix or a devshell. Both of which have a documentation which is scattered. It took me 4 days and also help from nixos unofficial discord server to do it. In the end i had to make a nix devshell using a different repo which set it up for you. Then make a cmake file and then and only then i was able to use it. So it has a little bit of a learning curve in the beginning where everything sort of makes sense but nothing works. Again this was all for a 4 line code. In the end some one just suggested me to use docker instead. Which is a valid solution too. But i was already too deep into devshell so I didn’t backtrack.