document pinning nixpkgs pin for NixOS by npins from system.nix#1232
Conversation
| NixOS relies on the `NIX_PATH` environment variable to locate `nixpkgs`, which defaults to using channels. | ||
| To instead use a `nixpkgs` version managed by `npins`, one can manually override this environment variable on system rebuilds: | ||
| NixOS defaults to using channels to locate `nixpkgs`. | ||
| You can instead pin a version using `npins` from the `system.nix` entrypoint: |
There was a problem hiding this comment.
That makes it sound like "the system.nix entry point" is some sort of first-class concept.
There was a problem hiding this comment.
its release notes entry mentions one could straight-up have their entire config in there, i.e. have a working system for the purpose of those nixos-rebuild / nixos-install without use of any other files.
that makes me wonder: what do you mean here when you'd consider it not first-class?
There was a problem hiding this comment.
I wasn't aware of that change, but now that you remind me, I remember seeing some discussion around it when it was still in the works.
In that case, how about linking to the NixOS (or more precisely, nixos-rebuild and nixos-install) reference documentation on the subject? Otherwise the initial impression of "you have to know to know" still holds.
There was a problem hiding this comment.
as per the release notes, its use-case that needs passing some extra thing is when it's used as an attrset of nixos configurations, in which case the commands need to know which one to use.
that feature isn't invoked in the example here, and i've been able to use the system.nix entrypoint myself without really having needed to be aware of how it can be used: as far as on-par functionality goes, it 'just works'.
hsjobeki
left a comment
There was a problem hiding this comment.
LGTM overall.
I'll port over the new styleguide from nixpkgs in a seperate PR. The current one in nix.dev is a bit lax.
Signed-off-by: cinereal <cinereal@riseup.net>
Signed-off-by: cinereal <cinereal@riseup.net>
8783323 to
5416f12
Compare
now that 26.05 is finally stable, i guess we can now document using npins with nixos on here now 😶