As are all the boot.kernelModules (those are the defaults) and boot.kernelParams (since you set hardware.nvidia.modesetting.enable).
I’m suspicious of the other extraModProbeConfig options, too. Most of them look useless. vblank_sem_control=0might do something, but it will likely cause other issues that are less immediately apparent, and if it does fix anything the original issue will eventually be solved with a driver update, at which point you now have this useless, potentially problematic option set, so at the very least you should add a TODO comment to remove it.
I’d really suggest just removing all those boot options unless you actually know what they do or have asserted that a particular one fixes an issue you’ve run into by isolating all other variables.
You’re also duplicating a lot of default options in the hardware.nvidia module, check search.nixos.org to see option defaults; it’s usually best to leave defaults at the default, in case upstream changes them for a reason - then you don’t need to figure out that reason as well.
I had the same problem but even with this configuration I couldn’t see any NVIDIA related services in systemctl. I explicitly enabled these services and now the black screen is gone.
My setup for RTX 2070 super with KDE:
boot.kernelParams = [
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
];
# Enable OpenGL/Graphics driver support
hardware.graphics = {
enable = true;
enable32Bit = true; # Crucial for Steam and MangoHud
};
# Tell the X server / Wayland to use the NVIDIA driver
services.xserver.videoDrivers = ["nvidia"];
# Configure NVIDIA specific settings
hardware.nvidia = {
# Modesetting is required for Wayland and compositors (like KDE Plasma 6)
modesetting.enable = true;
# Power management is required for experimental features like sleep/suspend.
# Turn this on if you experience problems waking up from sleep.
powerManagement.enable = true;
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (recommended for Turing and newer GPUs)
open = true;
# Enable the Nvidia settings menu (accessible via nvidia-settings CLI/GUI)
nvidiaSettings = true;
# Select the appropriate driver version
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
systemd.services = {
"nvidia-suspend" = {
wantedBy = [ "sleep.target" ];
serviceConfig = { Type = "oneshot"; };
script = "${config.hardware.nvidia.package.bin}/bin/nvidia-suspend";
};
"nvidia-resume" = {
wantedBy = [ "suspend.target" ];
serviceConfig = { Type = "oneshot"; };
script = "${config.hardware.nvidia.package.bin}/bin/nvidia-resume";
};
"nvidia-hibernate" = {
wantedBy = [ "hibernate.target" ];
serviceConfig = { Type = "oneshot"; };
script = "${config.hardware.nvidia.package.bin}/bin/nvidia-hibernate";
};
};