emacs.pkgs.withPackages from Nixpkgs can be used to configure Emacs.
Its main functionality is to add extra Emacs lisp libraries.
By (ab)using a library named default, user configuration (init.el) can
also be added by it.
A natural extension[1] is to add early-init.el via
emacs.pkgs.withPackages. With this patch, early-init.el can be added by
packaging it as a library named early-default.
The early-default library is similar to the default library except that
it is loaded right after early-init.el and is controlled by
inhibit-early-default-init.
[1]: https://github.com/nix-community/emacs-overlay/issues/532