helm/modules/desktop/bspwm.nix

61 lines
1.4 KiB
Nix
Raw Permalink Normal View History

{ options, config, lib, pkgs, ... }:
2019-08-06 10:56:54 -07:00
with lib;
with lib.my;
let cfg = config.modules.desktop.bspwm;
configDir = config.dotfiles.configDir;
in {
2020-03-28 22:48:43 -07:00
options.modules.desktop.bspwm = {
enable = mkBoolOpt false;
2020-03-28 22:48:43 -07:00
};
config = mkIf cfg.enable {
2020-10-26 11:04:52 -07:00
modules.theme.onReload.bspwm = ''
${pkgs.bspwm}/bin/bspc wm -r
source $XDG_CONFIG_HOME/bspwm/bspwmrc
'';
2020-03-28 22:48:43 -07:00
environment.systemPackages = with pkgs; [
lightdm
dunst
libnotify
(polybar.override {
pulseSupport = true;
nlSupport = true;
})
];
services = {
picom.enable = true;
2020-03-28 22:48:43 -07:00
redshift.enable = true;
xserver = {
enable = true;
displayManager = {
defaultSession = "none+bspwm";
lightdm.enable = true;
lightdm.greeters.mini.enable = true;
};
2020-04-05 22:54:14 -07:00
windowManager.bspwm.enable = true;
2020-03-28 22:48:43 -07:00
};
2019-08-06 10:56:54 -07:00
};
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";
2020-04-05 22:54:14 -07:00
"bspwm" = {
source = "${configDir}/bspwm";
2020-04-05 22:54:14 -07:00
recursive = true;
};
2020-01-12 15:17:17 -08:00
};
2019-08-06 10:56:54 -07:00
};
}