{ 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 ]; }; }