Quick code search (example via this topic) reveals configuration.nix - tokyob0t/dotfiles - Sourcegraph as a possible attempt you may try.
Here on the discourse are quite a lot topics regarding Intel / Nvidia hybrid - one of the most proactive people often helping out on that here even said they plan a better module to get through the whole Nvidia mess, for now in the wiki.nixos.org you should find info, Archlinux wiki as a last resort often has good info too.
What also often helps when posting questions are journalctl log snippets or in your case maybe X logs, configuration.nix you tried if you already have, again if unsure be encouraged to use the search function in the discourse, it often helps me and others to refine our questions towards a quicker solution.