this post was submitted on 28 Jun 2024
760 points (94.7% liked)

Programmer Humor

18292 readers
2706 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pimeys@lemmy.nauk.io 36 points 1 week ago (2 children)

Nix user arrives to the room.

[–] SeattleRain@lemmy.world 10 points 1 week ago (1 children)
[–] pimeys@lemmy.nauk.io 15 points 1 week ago

Nix can build you a bit-to-bit exact environment for your app. It is a superior environment, but is hard to use in the beginning and users can feel snobby sometimes. It is awesome, but YMMV.

[–] qaz@lemmy.world 5 points 1 week ago (1 children)

How do you separate Nix programs from the rest of the system?

[–] pimeys@lemmy.nauk.io 9 points 1 week ago* (last edited 1 week ago) (1 children)

It creates a set of symlinks so every program sees exactly the dependencies it needs.

https://nixos.org/guides/nix-pills/09-automatic-runtime-dependencies#automatic-runtime-dependencies

You can also create a container:

https://nixos.wiki/wiki/NixOS_Containers

Or you can create reproducible docker containers with nix:

https://dev.to/anurag_vishwakarma/a-better-way-to-build-reproducible-docker-images-with-nix-2k59

The secret sauce with nix is reproducibility. If it builds once, it will continue building exactly like that forever. Bit by bit.

[–] qaz@lemmy.world 2 points 1 week ago

That's very interesting, I was aware of how NixOS separated dependency versions but I didn't know it natively supported containers.