helm/modules/desktop/bspwm.nix
Henrik Lissner 14e2aada30
Refactor theme system, add 'hey theme' & reload handlers
Themes can now be swapped with 'hey theme NAME', or reloaded with the
reloadTheme script.
2020-10-25 15:52:50 -04:00

57 lines
1.3 KiB
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.bspwm;
in {
options.modules.desktop.bspwm = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
modules.theme.onReload.bspwm = "${pkgs.bspwm}/bin/bspc wm -r";
environment.systemPackages = with pkgs; [
lightdm
dunst
libnotify
(polybar.override {
pulseSupport = true;
nlSupport = true;
})
];
services = {
picom.enable = true;
redshift.enable = true;
xserver = {
enable = true;
displayManager = {
defaultSession = "none+bspwm";
lightdm.enable = true;
lightdm.greeters.mini.enable = true;
};
windowManager.bspwm.enable = true;
};
};
systemd.user.services."dunst" = {
enable = true;
description = "";
wantedBy = [ "default.target" ];
serviceConfig.Restart = "always";
serviceConfig.RestartSec = 2;
serviceConfig.ExecStart = "${pkgs.dunst}/bin/dunst";
};
# link recursively so other modules can link files in their folders
home.configFile = {
"sxhkd".source = "${configDir}/sxhkd";
"bspwm" = {
source = "${configDir}/bspwm";
recursive = true;
};
};
};
}