Setting nixpkgs.overlays in home-manager config does nothing

I’m having a very strange issue: overlays that I add to nixpkgs.overlays in my home-manager configuration aren’t actually applied to nixpkgs. Example:
in my home-manager config, I have
nixpkgs.overlays = [(final: prev {hello_world = prev.writeBashBin "hello-world" "echo hello world";})];
and
home.packages = with pkgs; [hello_world];
When I try to rebuild, Nix claims that hello_world is undefined!
I haven’t found anything on the internet like this. What could be going on?

probably has to do with:

          # disables the Home Manager option nixpkgs.*
          home-manager.useGlobalPkgs = true;
3 Likes

good catch!! man, how silly.

1 Like

Honestly HM should just error about it rather than silently failing…

1 Like

Not just nixpkgs.overlays, any nixpkgs.* options will get disabled.