blob: 0457b7308c0cf62f15499021d04f9801aceecbde [file] [log] [blame]
Skyler Grey51a0c612022-11-05 09:59:04 +00001{ lib, pkgs, home, config, ... }: {
Skyler Greye2ec0de2022-11-02 08:07:25 +00002 home = {
3 xsession = {
4 windowManager.xmonad = {
5 enable = true;
6 enableContribAndExtras = true;
7 config = ./xmonad/xmonad.hs;
Skyler Grey51a0c612022-11-05 09:59:04 +00008 libFiles = lib.pipe ./xmonad [
9 builtins.readDir
10 builtins.attrNames
11 (builtins.filter (name: name != "xmonad.hs"))
12 (map (name: {
13 inherit name;
14 value = "${./xmonad}/${name}";
15 }))
16 builtins.listToAttrs
17 ];
Skyler Greye2ec0de2022-11-02 08:07:25 +000018 extraPackages = haskellPackages: with haskellPackages; [
Skyler Grey51a0c612022-11-05 09:59:04 +000019 dbus
20 monad-logger
21 xmonad-contrib
Skyler Greye2ec0de2022-11-02 08:07:25 +000022 ];
23 };
24 };
25 programs.zsh.profileExtra = ''
26 if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
27 exec ${pkgs.systemd}/bin/systemd-cat -t xmonad ${pkgs.xorg.xinit}/bin/startx
28 fi
29 '';
30 home.file.".xinitrc".text = ''
Skyler Grey51a0c612022-11-05 09:59:04 +000031 ${home.xsession.windowManager.command}
Skyler Greye2ec0de2022-11-02 08:07:25 +000032 '';
33 };
34 config.services.xserver = {
Skyler Greyb43ac6b2022-10-31 00:48:34 +000035 enable = true;
Skyler Greye2ec0de2022-11-02 08:07:25 +000036 layout = "gb";
37 displayManager.startx.enable = true;
Skyler Greyb43ac6b2022-10-31 00:48:34 +000038 };
39}