1. Clone https://github.com/NixOS/nixpkgs as ~/nixpkgs (or whatever path you prefer).
  • Make sure to git pull if already cloned.
  1. Inside the Git repo, checkout the latest tag git checkout <YY-MM>.
  • Use to get recent tags: git tag --list '[0-9][0-9].*' --sort=creatordate | tail.
  1. Rebuild NixOS with this path: nixos-rebuild switch -I nixpkgs=~/nixpkgs.