Good question. I have an xmonad config in my setup and I’d also love this.
Here’s a project where I’m using Haskell with nix flakes if it’s helpful at all: https://github.com/cardanonix/pelotero-engine/blob/main/flake.nix
I’m betting we could use and alter that flake file to achieve something to that effect. It would be a game-changer for me. I currently do the whole eval thing to test my changes and it takes FOREVER to know if I’ve done something dumb.
Here’s my meta-config, if that helps at all: https://github.com/harryprayiv/nix-config
The Haskell and Xmonad part:
home manager: https://github.com/harryprayiv/nix-config/tree/intelTower/home/programs/xmonad
Base system: https://github.com/harryprayiv/nix-config/blob/intelTower/system/wm/xmonad.nix
Ps. I started an xmonad community here on Lemmy: https://infosec.pub/c/xmonad
Edit: surely OP will reply……💀