Is there a diffrence between nixos unstable pkgs and nixpkgs master branch?

Is one of them ahead of the other one?
Are they diff?

master is the branch that most changes get merged to directly. nixos-unstable is a channel, also marked as a branch in git, and it follows somewhat later. I think it’s well explained on Nix channels - NixOS Wiki

1 Like

Can I add master channel to my repos?
How often master updates are moved to unstable?
And how can I add a 3rd party git channel to my nix system? (e.g.: I made an update to a derivation and want to use it asap, and I also hate flakes :slight_smile: )

My problem is this, isn’t clear.
What is that nixpkgs vscode imported in nix file? It’s a folder containing vscode.nix? Is it all nixpkgs forked from master or sth else?

  1. From the linked wiki page:

Updates for the -unstable channels typically take a few days after commits land in the master branch.

  1. You could override nixpkgs path to a local git repository, see: A local repository instead of a Nix channel - #3 by raindev

The text above the code sample describes what is there…

My approach to that is to use ‘git worktree’ to check out a copy of the nixpkgs collection to ~/nixpkgs-foo.

where, for this example, ‘foo’ == vscode

It’s a checkout of the nixpkgs tree. The idea is to have some differences - local edits, or maybe just an older or newer version for whatever reason - and pull specific elements from the pkgs attrset in that collection.

An approach like this is also used sometimes to pull specific packages from nixos-unstable when the main system is on a release branch. It doesn’t always work, but when the divergence is small it can be fine.