diff --git a/modules/desktop/xmonad/default.nix b/modules/desktop/xmonad/default.nix new file mode 100644 index 00000000..3ceea297 --- /dev/null +++ b/modules/desktop/xmonad/default.nix @@ -0,0 +1,26 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.desktop.xmonad; +in +{ + options.modules.desktop.xmoad = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + # https://nixos.wiki/wiki/XMonad + services.xserver = { + enable = true; + windowManager.xmonad = { + enable = true; + enableContribAndExtras = true; + ghcArgs = [ + "-hidir /tmp" # place interface files in /tmp, otherwise ghc tries to write them to the nix store + "-odir /tmp" # place object files in /tmp, otherwise ghc tries to write them to the nix store + "-i${xmonad-contexts}" # tell ghc to search in the respective nix store path for the module + ]; + }; + }; + }; +}