Dead keys on gnome (UK keyboard)

I assume you want a UK layout that includes dead keys. In that case, in the Keyboard pane of GNOME Settings, add English (UK, intl., with dead keys) to Input Sources. Then, check what it did to your system settings. You will learn that xkbVariant (the part after the plus) is intl:

$ dconf read /org/gnome/desktop/input-sources/sources 
[…, ('xkb', 'gb+intl')]

Note that changing services.xserver.layout will not affect GNOME Shell since it only uses the X server option on first log-in and then uses the GSettings data stored in the dconf database. If you want to changes to take effect, you will need to reset the relevant settings and re-log in. Or, if you use home-manager, you can do something like this to always keep the GNOME settings in sync with the XKB ones from your NixOS configuration.

By the way instead of manually setting console.keyMap, you can use console.useXkbConfig = true; to inherit the service.xserver.layout in the console.