Nvidia Legacy 340 driver Blank screen

My computer is very old and it as a Nvidia geforce 210 (GT218), i as able to nixos-rebuild switch successfully by pinning kernel 6.3 and nvidiaLegacy340 driver on my config file, with that done I rebooted, systemd fires up correctly but when my display manager (gdm) should show up my screen does go blank while the monitor is on (the led indicators are on so i’m confident on this info).
I have tried commented out the services.xserver.videoDrivers = [ “nvidia” ]; and in doing that my graphical interface is functional but the xserver load the open source driver nouveau.
Here is the config

services.xserver = {
enable = true;
layout = “br”;
xkbVariant = “”;

videoDrivers = [ “nvidia” ];

displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;


boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_3;
#Gpu Hardware Options
hardware.nvidia = {
modesetting.enable = false;
package = config.boot.kernelPackages.nvidiaPackages.legacy_340;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;

Have I done something wrong here or Im just missing information ?
Maybe is lack of documentation on older driver?

Well I hope my explanation was clear if more info is needed let me know.
Thanks for everyone’s time.

Given that this is a hacked up driver that has been deprecated years ago with a dozen patches, I’d suspect it’s an issue with the driver first.

I’d try an older lts kernel such as 6.1, 5.15 or even older.

Are you using wayland? Not sure how the state of the default is in GDM/GNOME but if it’s trying to use wayland, that’s probably no bueno with such an old driver. Make it use x11.

Hello Atemu thank you for your answer.
Your are right the default GDM/GNOME looks to be using wayland, I’m a bit busy today so I’ll try to fix it later today.
If I find a solution I’ll post here ,Thanks for your time any way.