Hacker News new | ask | show | jobs
by commandersaki 1101 days ago
This probably goes against the flow, but I tried NixOS on a VPS and I found the tools to be inscrutable. Was so confused about Nix packaging and whether to use Flakes.
3 comments

Depends on the person. I work in a company that uses Nix for everything one could possibly imagine, and I've found there are a few types of people:

1. The purist: Is on an actual crusade to promote Nix and stomp out any competition, because, "reproducible."

2. The enthusiast: Likes using Nix to speed up development but recognizes it has a ton of shortcomings, among others being not friendly to beginners, and tends to avoid using it in production critical stuff.

3. The ex-Nix: matches the enthusiasm of the purist in stomping out Nix wherever possible and actively promoting its demise.

I'm personally in the second category. I use Nixos for my main development machine and really like devshells. Beyond that, I try to avoid it as much as possible for production.

We use it for devshells, and it’s awesome. New devs install nix and direnv and they instantly have all the right versions of all of our tooling. A first day setup process is now done in minutes instead of a day. Flakes made it possible for us to package up internal and external tools and ensure consistency across a team.

I have no experience running it in production, but I imagine if you don’t want to use containers it’d be a pretty good option.

for devshells use https://devenv.sh
You can unify the purist (1) and the ex-nix (3) into a single label: the emotionally attached.
I'm kinda 1 & 2, sometimes one much more than the other.
I'd start by using Home Manager which is a way to use nix packages in a sensible manner on any distro.

https://nix-community.github.io/home-manager/index.html

If you like the properties of Nix, but find it confusing, you should check out Devbox! It simplifies the process of creating Nix-powered dev environments:

https://github.com/jetpack-io/devbox