44 lines
904 B
Nix
44 lines
904 B
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
uiCfg = config.ui;
|
|
cfg = uiCfg.xmonad;
|
|
in
|
|
{
|
|
options.ui.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 uiCfg.polybar.enable (hp: [
|
|
hp.dbus
|
|
hp.monad-logger
|
|
]);
|
|
};
|
|
|
|
initExtra = ''
|
|
${pkgs.nitrogen}/bin/nitrogen --restore &
|
|
'';
|
|
};
|
|
};
|
|
}
|