2022-08-29 15:40:41 +03:00
|
|
|
{ lib, config, pkgs, ... }:
|
2022-04-27 01:17:51 +03:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2022-08-28 15:02:53 +03:00
|
|
|
uiCfg = config.ui;
|
2022-08-28 23:35:11 +03:00
|
|
|
cfg = uiCfg.xmonad;
|
2022-04-27 01:17:51 +03:00
|
|
|
in
|
|
|
|
{
|
2022-08-28 23:35:11 +03:00
|
|
|
options.ui.xmonad = {
|
2022-04-27 01:17:51 +03:00
|
|
|
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
|
2022-04-27 01:17:51 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
xsession = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
windowManager.xmonad = {
|
|
|
|
enable = true;
|
|
|
|
enableContribAndExtras = true;
|
2022-08-18 10:11:10 +03:00
|
|
|
config = ./config.hs;
|
2022-08-28 23:35:11 +03:00
|
|
|
extraPackages = mkIf uiCfg.polybar.enable (hp: [
|
2022-08-24 23:54:30 +03:00
|
|
|
hp.dbus
|
|
|
|
hp.monad-logger
|
|
|
|
]);
|
2022-04-27 01:17:51 +03:00
|
|
|
};
|
2022-08-25 17:57:00 +03:00
|
|
|
|
|
|
|
initExtra = ''
|
2022-08-25 23:10:09 +03:00
|
|
|
${pkgs.nitrogen}/bin/nitrogen --restore &
|
2022-08-25 17:57:00 +03:00
|
|
|
'';
|
2022-04-27 01:17:51 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|