Nvidia - Monitor keeps turning off

I installed the nvidia drivers on NixOS using the following line: services.xserver.videoDrivers = [ "nvidia" ]; Now the monitor keeps on switching off after booting for 1-2 mins then whatever app I start it it starts turning off again (the power LED on the monitor keeps blinking) There are no such issues if I use nouveau and the nvidia driver is working on other linux distros. Here is what I tried: 1) As per the Nixos Wiki, I tried all the lines for hardware.opengl and hardware.nvidia settings 2) I tried changing the nvidia package to different versions using the hardware.nvidia.package command 3) Changed the linux kernel version between many versions between 5.19 and 6.4 4) I changed the DE from KDE to XFCE 5) Tried the nvidiaPersistenced option 6) Looked at journalctl -x , but I didn’t see nothing which glared at me as the issue (but I’m new so…) 7) None of the solutions I found online worked. I have no idea what else can be done. Here are my specs: Nvidia 1060 6GB, Viewsonic 240Hz monitor, NixOS 23.05 stable version. If you guys need more info, tell how to get it and I will provide it. Any ideas how this issue can be fixed?