Skyler Grey | 3a9a2b1 | 2023-02-13 08:04:05 +0000 | [diff] [blame] | 1 | { lib, pkgs, home, config, utils, ... }: { |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 2 | home = { |
Skyler Grey | 3a9a2b1 | 2023-02-13 08:04:05 +0000 | [diff] [blame] | 3 | home.packages = with pkgs; [ xob pamixer ]; |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 4 | xsession = { |
| 5 | windowManager.xmonad = { |
| 6 | enable = true; |
| 7 | enableContribAndExtras = true; |
Skyler Grey | 3a9a2b1 | 2023-02-13 08:04:05 +0000 | [diff] [blame] | 8 | config = utils.interpolateFile ./xmonad/xmonad.hs; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 9 | libFiles = lib.pipe ./xmonad [ |
| 10 | builtins.readDir |
| 11 | builtins.attrNames |
| 12 | (builtins.filter (name: name != "xmonad.hs")) |
| 13 | (map (name: { |
| 14 | inherit name; |
Skyler Grey | 3a9a2b1 | 2023-02-13 08:04:05 +0000 | [diff] [blame] | 15 | value = utils.interpolateFile "${./xmonad}/${name}"; |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 16 | })) |
| 17 | builtins.listToAttrs |
| 18 | ]; |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 19 | extraPackages = haskellPackages: with haskellPackages; [ |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 20 | dbus |
| 21 | monad-logger |
| 22 | xmonad-contrib |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 23 | ]; |
| 24 | }; |
| 25 | }; |
| 26 | programs.zsh.profileExtra = '' |
| 27 | if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then |
| 28 | exec ${pkgs.systemd}/bin/systemd-cat -t xmonad ${pkgs.xorg.xinit}/bin/startx |
| 29 | fi |
| 30 | ''; |
| 31 | home.file.".xinitrc".text = '' |
Skyler Grey | 5c1b444 | 2023-02-26 12:05:16 +0000 | [diff] [blame] | 32 | export XDG_DESKTOP_PORTAL_DIR=${pkgs.xdg-desktop-portal-gnome}/share/xdg-desktop-portal/portals |
| 33 | ${pkgs.xdg-desktop-portal-gnome}/libexec/xdg-desktop-portal-gnome & |
| 34 | ${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal & |
Skyler Grey | 51a0c61 | 2022-11-05 09:59:04 +0000 | [diff] [blame] | 35 | ${home.xsession.windowManager.command} |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 36 | ''; |
| 37 | }; |
| 38 | config.services.xserver = { |
Skyler Grey | b43ac6b | 2022-10-31 00:48:34 +0000 | [diff] [blame] | 39 | enable = true; |
Skyler Grey | e2ec0de | 2022-11-02 08:07:25 +0000 | [diff] [blame] | 40 | displayManager.startx.enable = true; |
Skyler Grey | b43ac6b | 2022-10-31 00:48:34 +0000 | [diff] [blame] | 41 | }; |
| 42 | } |