Conversation

I see a lot of files with pinned stuff and magic configs and things that seem to be generated by tools, but it's hard to figure out what process people went through to arrive at this stuff! Or whether they use tools to keep the configs up to date or not… 😬
1
I’ve been a happy niv user for a long time now. It puts versions in a json file you can easily read, edit, and copy between projects to increase sharing if so desired.
1
Yes, exactly! The niv command line tool has commands to add, update, and modify dependencies in the lock file. I was unreasonably put off at first for some reason, but it won me over. It’s quite well thought out.
1
1
Cool! It would be really neat if something like this could be built in at some point - seems like a handy thing to have. Is niv the thing I see where people have a bunch of autogenerated nix files in their project repos?
1
Most likely, yes. On the one hand, I agree that it should be available out of the box because it's so useful. On the other hand, nix (the CLI) development is in a bad place with its inability to cut a release. Niv being external has avoided that jam.
1
1
Easy for me to say, but I think there have been some benefits to niv being developed as an external tool. It's pretty great that adopting it doesn't involve large scale changes to what you're doing, and I suspect its separation from nix itself has encouraged it to stay simple.
1
1
I guess when I tried Niv initially I wasn't sure what it added on top of nix, and then the generated code was bewildering. I had questions like: Do I need to be careful not to change the generated code? Will it be kept up to date by the tool?
2
1