How can I install ghc when I get modMask not in scope?

I’m pretty sure I had ghc on my system, probably from XMonad dependency, but it’s not there anymore, after I upgraded my channels.

Anyways, I try to add it, but I get this when I nixos-rebuild

copying path '/nix/store/n3lkrgdx93fa9a3af4k37g85l09ipf7l-qtdeclarative-6.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/irissmc9b96zlffqlclvi520431qw0yk-make-binary-wrapper-hook' from 'https://cache.nixos.org'...
[1 of 1] Compiling Main             ( tmp.hs, tmp.o )

tmp.hs:3:7: error: Not in scope: `modMask'
  |
3 |     { modMask = mod4Mask  -- Rebind Mod to the Super key
  |       ^^^^^^^
error: builder for '/nix/store/ax72x0rb610g3g26j1dz8q4bp3g3qwyi-xmonad.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/9qsk2xihbg9bspdqq60qzk51jaiw24ka-xmonad.drv' failed to build
error: 1 dependencies of derivation '/nix/store/80rjw9k0shkg6fmd8g1k3w894prr5wyh-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rwyiwnazskky5fn5lz216ps89l4xgiic-xsession.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vfd8j6wqa9nhn1vdxnxg9hsqslzf43v5-nixos-system-quasar-23.05.5533.70bdadeb94ff.drv' failed to build

Any pointers as to what I can try?

I would say you’ve updated XMonad, some type in the library has changed removing the modMask constructor and now you get an error saying it’s not defined.
You should probably check the changelog.

This was not because of ghc, which installed fine. It was because of a new line I found in the installation instructions.

 services.xserver.windowManager.xmonad.config = builtins.readFile /home/b0ef/.config/xmonad/xmonad.hs;

This caused it to look into my xmonad file, which was not up to par, because I’m troubleshooting;)

So, I can close this thread and focus on the other open threads.

Thanks;)