Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 1 | { lib, pkgs, home, config, ... }: { |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 2 | home = { |
| 3 | xsession = { |
| 4 | windowManager.xmonad = { |
| 5 | enable = true; |
| 6 | enableContribAndExtras = true; |
| 7 | config = ./xmonad/xmonad.hs; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 8 | 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 Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 18 | extraPackages = haskellPackages: with haskellPackages; [ |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 19 | dbus |
| 20 | monad-logger |
| 21 | xmonad-contrib |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 22 | ]; |
| 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 Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 31 | ${home.xsession.windowManager.command} |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 32 | ''; |
| 33 | }; |
| 34 | config.services.xserver = { |
Skyler Grey | b43ac6b | 2022-10-31 00:48:34 +0000 | [diff] [blame] | 35 | enable = true; |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 36 | layout = "gb"; |
| 37 | displayManager.startx.enable = true; |
Skyler Grey | b43ac6b | 2022-10-31 00:48:34 +0000 | [diff] [blame] | 38 | }; |
| 39 | } |