module: add wm

This module sets up window managers, and the common xorg configuration
between them.
This commit is contained in:
Infinidoge 2022-05-19 13:40:34 -04:00
parent 336ffb949b
commit 48e0ba19c2
8 changed files with 54 additions and 37 deletions

View file

@ -0,0 +1,46 @@
{ pkgs, lib, config, ... }:
with lib;
with lib.hlissner;
let
cfg = config.modules.desktop.wm;
in
{
options.modules.desktop.wm = {
enable = mkBoolOpt false;
qtile.enable = mkBoolOpt false;
};
config = mkIf cfg.enable (mkMerge [
{
info = {
graphical = mkDefault true;
monitors = mkDefault 1;
};
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
};
environment.systemPackages = with pkgs; flatten [
(with xorg; [
xwininfo
xprop
])
xsecurelock
blugon
];
}
(mkIf cfg.qtile.enable {
services.xserver.windowManager.qtile.enable = true;
info.env.wm = "qtile";
fonts.fonts = with pkgs; [
powerline-fonts
ubuntu_font_family
];
})
]);
}