Does the 32bit nixpkgs not have gnome 40?
Are you attempting to build it on the device, or somewhere else?
I would have a guess that you’re just running out of RAM if you’re building it on that device.
maybe try: Nix command/log - NixOS Wiki to get build logs.
I’m also somewhat surprised you have the patience to use such a device, those atom processors were slower than the Pentium 4’s that came out 4 years earlier, and an Raspberry Pi 4, would run circles around today.
I would highly recommend you cut your losses and upgrade to a “modern” laptop like a Thinkpad x220 for $200
Edit: Oh and one thing too, is that it’s gnome 40, not gnome 4.0, are you sure you’re installing the correct package?
your config should have this line:
desktopManager.gnome.enable = true;