Home-manager and MKL overlay

Hi!

I am trying to use the mkl blas and lapack overlay defined in the nixpkgs manual:

self: super:

{
  blas = super.blas.override {
    blasProvider = self.mkl;
  };

  lapack = super.lapack.override {
    lapackProvider = self.mkl;
  };
}

I can add this overlay to my NixOS system configuration in the overlays directory and it works. However, doing the same in my home manager configuration leads to infinite recursion. Astonishingly, I can add this overlay to nixpkgs.overlays = [...] in my home manager configuration and it works again. Do you have any clues about why this could be the case? I tried to deactivate all other overlays and overrides I am using, and this behavior does not change.