We used to have the configuration of the kernel available in a somewhat convenient place (/run/booted-system/kernel-modules/config) but that has disappeared. So instead just make /proc/configs.gz available. It only eats a few kilobytes.
Nixpkgs is a collection of packages for Nix package manager. Nixpkgs also includes NixOS linux distribution source code.