Since moving to a flake based setup (for both system and user (home-manager)) I can (and should?) not register channels anymore (I suppose), to make sure my sources are in sync.
However, I still want to use my “standard” shell.nix definitions, which refer to <nixpkgs> (and I would like to add nixpkgs-unstable too).
Does this mean I should be looking for a way to make sure nixpkgs=... is somehow put in my NIX_PATH env by application of my flake, such that it refers to the same path that is downloaded by my flake based on the flake inputs?
the main idea is to put the outPath of the nixpkgs flake input into NIX_PATH, indeed.
i.e. home.sessionVariables.NIX_PATH = nixpkgs.outPath (home-manager) or nix.nixPath = [ "nixpkgs=nixpkgs.outPath" ] (nixos).
Funny, for me it didn’t work even though I expected that, meaning after su - checking env | grep nixpkgs it was good, but as a user the result was empty. I then added the HM part which made it work.
My first try was (btw) to try to assign the path directly in the import statement like this, but that didn’t work, presumable because nixPath is/can be overwritten somewhere (?):
As for the specific HM config, this appears to work for <nixpkgs> but not for <unstable> even though I’d have expected it to be passed transparently (from reading your link)… I don’t understand why.