Preventing Suspend at Gnome Login Screen

I’m running a NixOS home server that I frequently shell into. To ensure I can always access it, I need to prevent it from suspending.

I’ve successfully prevented suspend when I’m logged in as a user using the following dconf setting:

dconf.settings = dconfCommon {
  "org/gnome/settings-daemon/plugins/power" = {
    sleep-inactive-ac-type = 'nothing';
  };
};

However, I’m struggling to prevent the server from suspending when it’s at the Gnome login screen (GDM), particularly after a remote restart. This is problematic because I lose SSH access if it suspends.

I’ve found a lot of different methods online about how to achieve this for the display manager. Has anyone successfully configured NixOS to prevent suspend while at the Gnome login screen? If so, could you please share your configuration or point me in the right direction?

Any help would be greatly appreciated!