Plasma 6 wayland sessions seems to use Intel card instead of Nvidia

When I start a Plasma 6 Wayland session, everything is much slower than on X11. The output of nix-shell -p glxinfo --command "glxinfo -B" includes Device: Mesa Intel(R) UHD Graphics 630 (CFL GT2) (0x3e9b) and OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2).
So I assume everything is slow because the integrated card is used.
The usual solution is to set KWIN_DRM_DEVICES, but I tried that and it didn’t work:

$ sudo cat /proc/$(pidof kwin_wayland)/environ | tr '\0' '\n' | grep KWIN_DRM_DEVICES
KWIN_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1

/dev/dri/card0 is the Nvidia card:

$ ls -lr /dev/dri/by-path/
total 0
lrwxrwxrwx 1 root root 13 Dec 12 00:50 pci-0000:01:00.0-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Dec 12 00:50 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Dec 12 00:50 pci-0000:00:02.0-render -> ../renderD129
lrwxrwxrwx 1 root root  8 Dec 12 00:50 pci-0000:00:02.0-card -> ../card1

$ nix-shell -p pciutils --command "lspci"\
...
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
...
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
...

Here are the relevant parts of a config:

  boot.kernelParams = [ "initcall_blacklist=simpledrm_platform_driver_init" ];
  boot.initrd.kernelModules = [ "nvidia" ];
  boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
  
  services.xserver = {
    enable = true;
    videoDrivers = [ "nvidia" ];
  };

  services.displayManager.sddm = {
    enable = true;
    wayland.enable = true;
  };
  services.desktopManager.plasma6.enable = true;

  nixpkgs.config.allowUnfree = true;
  hardware.nvidia = {
    modesetting.enable = true;
    open = true;
    prime = {
      sync.enable = true;
      nvidiaBusId = "PCI:1:0:0";
      intelBusId = "PCI:0:2:0";
    };
  };

  hardware.graphics = {
    enable = true;
    enable32Bit = true;
  };  
  environment.sessionVariables = {
    LIBVA_DRIVER_NAME = "nvidia";
    KWIN_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1";
  };