nix-config/nix/modules/home-manager/desktop/dwm.nix

39 lines
623 B
Nix
Raw Normal View History

2025-02-20 21:19:21 +00:00
{
config,
lib,
pkgs,
...
}:
with lib;
{
options.homeManagerModules.dwm.enable = mkEnableOption "Enable dwm";
2025-02-20 21:19:21 +00:00
config = mkIf config.homeManagerModules.dwm.enable {
home = {
2025-03-18 16:07:04 +00:00
file."${config.home.sessionVariables.XINITRC}".text = ''
systemctl --user import-environment DISPLAY
2025-02-20 21:19:21 +00:00
poweralertd -s &
2025-02-20 21:19:21 +00:00
2025-03-17 23:05:33 +00:00
setbg &
systemctl --user start dwm-status &
exec dwm
'';
2025-03-18 16:07:04 +00:00
sessionVariables = {
XINITRC = "${config.xdg.configHome}/X11/xinitrc";
};
packages = with pkgs; [
dunst
poweralertd
2025-03-17 23:05:33 +00:00
xwallpaper
];
};
2025-02-20 21:19:21 +00:00
};
}