system/home/ui/xmonad/default.nix

45 lines
904 B
Nix
Raw Normal View History

2022-08-29 15:40:41 +03:00
{ 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; [
2022-08-29 15:40:41 +03:00
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;
2022-08-18 10:11:10 +03:00
config = ./config.hs;
extraPackages = mkIf uiCfg.polybar.enable (hp: [
2022-08-24 23:54:30 +03:00
hp.dbus
hp.monad-logger
]);
};
initExtra = ''
${pkgs.nitrogen}/bin/nitrogen --restore &
'';
};
};
}