We have nixpkgs=
and nixpkgs-overlays=
in NIX_PATH
:
$ echo $NIX_PATH | sed 's/:/\n/g'
nixpkgs=/nix/store/5mvvx7k39vz95il4vsxli8dlaivkvwma-nixpkgs
nixpkgs-overlays=/nix/store/r6sh2454inzkmw9sc5vqizf46nvdv359-overlay
/home/user/projects/src/local/deploy
It works pretty well with nix repl
:
$ nix repl '<nixpkgs>'
Welcome to Nix version 2.2.2. Type :? for help.
nix-repl> pkgs.overlays
[ «lambda @ /nix/store/r6sh2454inzkmw9sc5vqizf46nvdv359-overlay/default.nix:1:1» ]
But it not working for system configuration which could be nix-instantiate
'ed:
if replace
pkgs.overlays
with(import <nixpkgs> {}).pkgs.overlays
it prints a list of lambdas, this proves that overlays exists and this is not anix-instantiate
problem, but this is not a solution
# $ cat machine.nix
let nixos = {
system = "x86_64-linux";
configuration = { config, pkgs, ... }: {
networking.hostName = builtins.trace pkgs.overlays "overlays-are-gone";
};
}; in (import <nixpkgs/nixos> nixos).system
pkgs.overlays
is empty:
$ nix-instantiate ./machine.nix
trace: [ ]
...