summaryrefslogtreecommitdiff
path: root/modules/nixos/xmonad.nix
blob: c5fedc2b9b7661db4901eb1bfb20affddf406b9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.xmonad;
in {
  options.nixfiles.modules.xmonad.enable = mkEnableOption "XMonad";

  config = mkIf cfg.enable {
    nixfiles.modules.x11.enable = true;

    hm = {
      xsession = {
        enable = true;

        scriptPath = ".xinitrc";

        windowManager.command = "${pkgs.xmonad-ng}/bin/xmonad-ng";
      };
    };

    services.xserver.displayManager.startx.enable = true;

    nixpkgs.overlays = [inputs.xmonad-ng.overlays.default];
  };
}