It is parameterized by a function that takes a name and evaluates to the option type for the attribute of that name. Together with submoduleWithExtraArgs, this subsumes nixosSubmodule.
Nixpkgs is a collection of packages for Nix package manager. Nixpkgs also includes NixOS linux distribution source code.