I enable the desktop environment through the normal nixos module and it works great, but I use KDE and it doesn't have declarative configuration support through nixos so all the dotfiles are managed like normal. I've heard GNOME has better support if you want to set the configs through NixOS or Home-Manager whatever, but I haven't used it so idk.
NixOS
NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels of stability and size.
This community discusses NixOS, Nix, and everything related.
I asked this question on Mastodon and got some helpful answers. I haven't had the time to try anything yet, but here are some links. KDE: https://github.com/pjones/plasma-manager Gnome: https://hoverbear.org/blog/declarative-gnome-configuration-in-nixos/ Xfce may be similar to the Gnome article but using xfconf and xfconf-query to get the settings to apply. Again I haven't tried any of these suggestions. This is a summary of the info I got elsewhere.
KDE Plasma is amazing...
Yes, after switching to the NixOS KDE desktop it is very nice looking desktop environment out of the box. Nice than the NixOS Xfce setup. I was also pointed to plasma manager to try moving some settings into my .nix files.
Feel free to grab inspiration from https://github.com/drupol/nixos-x260
Thank you. These examples show more settings than I've found anywhere.