Skyler Grey | 0b6f001 | 2025-01-01 10:51:33 +0000 | [diff] [blame] | 1 | { |
| 2 | inputs, |
| 3 | config, |
| 4 | lib, |
| 5 | system, |
| 6 | pkgs, |
| 7 | ... |
| 8 | }: let |
| 9 | cfg = config.chimera.terminal.ghostty; |
| 10 | in { |
| 11 | options.chimera.terminal.ghostty = { |
| 12 | enable = lib.mkOption { |
| 13 | type = lib.types.bool; |
| 14 | description = "Use ghostty as your terminal"; |
| 15 | default = true; |
| 16 | }; |
| 17 | default = lib.mkOption { |
| 18 | type = lib.types.bool; |
| 19 | description = "Use ghostty as your default terminal"; |
| 20 | default = true; |
| 21 | }; |
| 22 | }; |
| 23 | |
| 24 | config = lib.mkIf cfg.enable { |
| 25 | chimera.terminal.default = lib.mkIf cfg.default "${inputs.ghostty.packages.${system}.ghostty}/bin/ghostty"; |
| 26 | |
| 27 | home.packages = [ |
| 28 | inputs.ghostty.packages.${system}.ghostty |
| 29 | ]; |
| 30 | |
| 31 | gtk.enable = true; |
| 32 | gtk.iconTheme.package = pkgs.libsForQt5.breeze-icons; |
| 33 | gtk.iconTheme.name = "breeze"; |
| 34 | |
| 35 | xdg.configFile."ghostty/config" = lib.mkIf config.chimera.theme.catppuccin.enable { |
| 36 | text = '' |
| 37 | theme = catppuccin-${lib.strings.toLower config.chimera.theme.catppuccin.style} |
| 38 | ''; |
| 39 | }; |
| 40 | }; |
| 41 | } |