helm/modules/desktop/bspwm.nix
2021-03-01 20:43:12 -05:00

61 lines
1.4 KiB
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.bspwm;
configDir = config.dotfiles.configDir;
in {
options.modules.desktop.bspwm = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
modules.theme.onReload.bspwm = ''
${pkgs.bspwm}/bin/bspc wm -r
source $XDG_CONFIG_HOME/bspwm/bspwmrc
'';
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;
};
};
};
}