about summary refs log tree commit diff
path: root/modules/nixos/xmonad.nix
blob: 7b49f523a3f8a12a5a4c0c91b1d5015f94bd7844 (plain) (blame)
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
30
31
{
  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 = getExe' pkgs.xmonad-ng "xmonad-ng";
      };
    };

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

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

Consider giving Nix/NixOS a try! <3