Nvidia-settings and nvidia-offload not found

I need to override this dependency somehow and make it nvidia_x11_legacy390

Is this the correct way to do it?

nixpkgs.overlays = [
  (final: prev: {
      bumblebee = prev.bumblebee.override { nvidia_x11 = prev.nvidia_x11_legacy390; };
  })
];