I’ve successfully installed xmonad and xfce on my system by adding the following to my configuration.nix
services.xserver.displayManager = {
lightdm.greeter.enable = true;
defaultSession = "xfce+xmonad";
lightdm.enable = true;
lightdm.extraSeatDefaults =
''
greeter-hide-users = false
'';
};
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
thunarPlugins = [ pkgs.xfce.thunar-archive-plugin ];
};
};
};
# Xmonad
services.xserver.windowManager.xmonad =
{
enableContribAndExtras = true;
enable = true;
extraPackages = haskellPackages:
[ haskellPackages.xmonad
haskellPackages.xmonad-contrib
haskellPackages.xmonad-extras
];
};
Xmonad and xfce themselves (mostly) work, but when I try to use my own xmonad configuration by running xmonad --recompile
, I get errors like
xmonad.hs:19:1: error:
Could not load module ‘XMonad.Actions.GridSelect’
It is a member of the hidden package ‘xmonad-contrib-0.16’.
You can run ‘:set -package xmonad-contrib’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
19 | import XMonad.Actions.GridSelect
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So apparently I do have xmonad-contrib
, but for some reason it is hidden. Normally I would do something like sudo ghc-pkg expose xmonad-contrib
, but ghc-pkg
also cannot find xmonad-contrib
.
My questions would be
- Shouldn’t
xmonad --recompile
work by default? Is this a bug in the package or in my configuration? How can I makexmonad-contrib
visible when compilingxmonad
? - In general, how do I make certain packages visible for me? I understand it has something to do with
nix-shell
and ashell.nix
file, but I still do not understand how to use these properly.
I’m using nixos unstable, btw.