I am trying to configure NixOS VM to develop code in haskell and am encountering problems with the basic installation of xmonad and emacs. Relevant part of my/etc/nixos/configuration.nix
environment.systemPackages = with pkgs; [
emacs
emacs24Packages.haskellMode
xlibs.xmessage
haskellPackages.haskellPlatform.ghc
haskellPackages.xmobar
haskellPackages.xmonad
haskellPackages.xmonadContrib
haskellPackages.xmonadExtras
];
xmonad: when I try to compile the code, xmonad complains that it could not find the XMonad.Util.EZConfig module. Compiling xmonad.hswith ghc is fine, and I can also load the module in ghci. On channel #nixos I was told to use the ghcWithPackages function, but I could not fix the problem. Moreover, I would like to understand why this problem primarily arises, since it seems to me that this is a very simple use case. The minimal xmonad.hsone I am having a problem with:
import XMonad
import XMonad.Util.EZConfig
main = xmonad $ defaultConfig
{ modMask = mod4Mask
, terminal = "konsole"
}
`additionalKeysP`
[ ("M-e", spawn "emacs")
, ("M-f", spawn "firefox")
]
emacs: haskellmode ( configuration.nix ), haskell-mode emacs.
, , - , .