I feel like NIX_PATH creates more issues than it fixes

You can add nixpkgs in the store and then set NIX_PATH to
/run/current-system/nixpkgs, so it shouldn’t be too hard.

Something like that:

{ pkgs, ... }:
{
  nix.nixPath = [ "nixpkgs=/run/current-system/nixpkgs" ];
  system.extraSystemBuilderCmds = ''
    ln -s ${pkgs.path} $out/nixpkgs
  '';
}

Wout Mertens via NixOS Discourse discourse@discourse.nixos.org writes:

3 Likes

Thanks! That works well but unfortunately it is not the same as the channel download so when pushing this to other hosts I need to push the entire thing :-/