Follow

@b0rk

There's one pitfall (that I totally fell into when setting up my own Nix system) that I think people will end up in if they follow these steps: what does `<nixpkgs>` refer to? What version of nixpkgs and how is it updated?

It's important, because that's what nix-shell and the imo terrible nix-env use. (Apart from standard concerns about old state, if you use either of the two for programs that need to link libGL, you'd better it be the sameish version as the one your system was built with.)

What will happen is that nixpkgs will refer to a nix-profile-managed version (and different users might have their own, including root having their own).

I don't know what's a good solution here that's not a hack of some sort and doesn't require people to keep track of this other pointer to a version of nixpkgs. My hacky way of dealing with that is to ensure that `<nixpkgs>` points at a dump of nixpkgs used to build the system. Sadly that gets hacky as soon as you have overlays or other customizations of nixpkgs in your system configuration.

A similar issue is the meaning of nixpkgs in flake repository (used by `nix shell` and the like), but that will probably only become important as people adopt flake-based tools more.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.