I’ve Emacs installed via Home Manager. When I start Emacs an error message is shown, and the configuration in programs.emacs.extraConfig isn’t applied.
I don’t have any ~/.emacs file or a ~/.emacs.d directory. But the configuration in programs.emacs.extraConfig works flawlessly if I move its content to a new ~/.emacs file and rebuild the system.
I don’t use the home-manager support for my configuration, only its package resolution, so I’m not sure, but default.elshould be resolved by default if it is present. Maybe try something a bit less complex than using use-package to see if that works, and check if the package is loaded, as well as whether default.el is present on the load path.
Looking at the docs for emacs here, it’s possible you’re disabling loading this config in an already existing config file?
Note that you can still set ~/.config/init.el with xdg.configFile or ~/.emacs with home.file, too, although that is probably best avoided.
You may also want to set use-package-always-ensure to nil and use-package-ensure-function to 'ignore, so that use-package and nix don’t end up fighting over packages.