nix-configs/modules/desktop-environment/panels/xmobar/default.nix

34 lines
639 B
Nix
Raw Normal View History

2024-03-05 17:10:35 +01:00
{
lib,
pkgs,
...
}: {
home-manager.users.jade = {
config,
pkgs,
...
}: let
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
with pkgs; [
xmobar
statgrab
]);
in {
home = {
packages = [xmobarGhc];
file."xmobar.hs" = rec {
source = ./xmobar.hs;
target = ".config/xmobar/xmobar.hs";
onChange = ''
${xmobarGhc}/bin/ghc -threaded ${target}
${pkgs.busybox}/bin/pkill xmobar
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
'';
};
};
programs.xmobar = {
enable = true;
};
};
}