nix-configs/modules/desktop/xmonad.nix
2024-02-27 18:18:55 +01:00

43 lines
989 B
Nix

{
lib,
pkgs,
...
}: {
home-manager.users.jade = {
config,
pkgs,
...
}: let
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
with pkgs; [
xmobar
statgrab
]);
in {
home.packages = [xmobarGhc pkgs.xmonadctl];
programs.xmobar = {
enable = true;
};
home.file."xmobar.hs" = rec {
source = ../../haskell/xmobar/xmobar.hs;
target = ".config/xmobar/xmobar.hs";
onChange = ''
${xmobarGhc}/bin/ghc -threaded ${target}
${pkgs.busybox}/bin/pkill xmobar
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
'';
};
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ../../haskell/xmonad/xmonad.hs;
};
home.file.wallpaper = {
target = "Pictures/wallpaper.jpg";
source = ../../other/wallpaper.jpg;
onChange = ''
feh --bg-fill ~/Pictures/wallpaper.jpg;
'';
};
};
}