Gnome on wayland lags with nvidia drivers

Hello! I’m trying to configure nvidia drivers for gnome on wayland. I scoured the entire Internet and it seems I didn’t find out something, since gnome on Wayland lags terribly when used. But the strangest thing is that gnome on xorg works many times smoother than on wayland, although everything should be the other way around

Here is my nvidia.nix

{ config, lib, pkgs, ... }:
{

  boot.kernelParams = [ "nvidia_drm.fbdev=1" "nvidia-drm.modeset=1" "module_blacklist=i915" ];
  hardware.graphics.enable = true;
  hardware.graphics.enable32Bit = true;
  services.switcherooControl.enable = true;
  boot.blacklistedKernelModules = [ "nouveau" ];
  hardware.nvidia.nvidiaPersistenced = true;
  
  services.xserver.videoDrivers = ["nvidia"];
  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = false;
    powerManagement.finegrained = false;
    open = false;
    nvidiaSettings = true;
    package = config.boot.kernelPackages.nvidiaPackages.beta;
  };

}

And here is a small piece of cpnfiguration.nix associated with nvidia kernel modules:

boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_drm" "nvidia_uvm" ];