system/nix/wm/xmonad/default.nix

43 lines
927 B
Nix

{ lib, config, pkgs, ...}:
with lib;
let
cfg = config.wm.xmonad;
in
{
options.wm.xmonad = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable xsessions and xmonad window manager";
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
xclip # access x clipboard from a console
dmenu # menu for x window system
flameshot # powerful yet simple to use screenshot software
nitrogen # wallpaper manager
];
xsession = {
enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ./config.hs;
extraPackages = mkIf config.wm.bar.polybar.enable (hp: [
hp.dbus
hp.monad-logger
]);
};
initExtra = ''
${pkgs.nitrogen}/bin/nitrogen --restore &
'';
};
};
}