I forked nixpkgs and created a branch on which I made a change to a nixos module (nixos/modules/programs/less).
I’d like to test it out before making a PR, but I’m not sure how to do so. Is there a way to temporarily point my nixos configuration at my forked copy of nixpkgs?
This is useful for testing packages, but not nixos modules. You may also want to use -A with it as well: FAQ/Why not use nix-env -i foo? - NixOS Wiki
Either way, thanks for sharing
Thanks, passing -I nixpkgs=/path/to/your/nixpkgs to nixos-rebuild seems like the most straightforward approach, and it worked like a charm. I really appreciate the help.