1
0

ghostty.nix 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. { pkgs
  2. , config
  3. , lib
  4. , ...
  5. }:
  6. let
  7. ghosttyCatppuccinSrc = pkgs.fetchFromGitHub {
  8. owner = "catppuccin";
  9. repo = "ghostty";
  10. rev = "9e38fc2";
  11. sha256 = "sha256-RlgTeBkjEvZpkZbhIss3KxQcvt0goy4WU+w9d2XCOnw=";
  12. };
  13. in
  14. {
  15. xdg.configFile = {
  16. "ghostty/themes/catppuccin-frappe.conf".text =
  17. lib.strings.fileContents
  18. (ghosttyCatppuccinSrc + "/themes/catppuccin-frappe.conf");
  19. "ghostty/themes/catppuccin-latte.conf".text =
  20. lib.strings.fileContents
  21. (ghosttyCatppuccinSrc + "/themes/catppuccin-latte.conf");
  22. "ghostty/themes/catppuccin-macchiato.conf".text =
  23. lib.strings.fileContents
  24. (ghosttyCatppuccinSrc + "/themes/catppuccin-macchiato.conf");
  25. "ghostty/themes/catppuccin-mocha.conf".text =
  26. lib.strings.fileContents
  27. (ghosttyCatppuccinSrc + "/themes/catppuccin-mocha.conf");
  28. };
  29. programs.ghostty = {
  30. enable = true;
  31. package = null;
  32. installBatSyntax = false;
  33. installVimSyntax = false;
  34. enableBashIntegration = true;
  35. enableZshIntegration = true;
  36. enableFishIntegration = true;
  37. themes = {
  38. iceberg-dark = {
  39. background = "161821";
  40. foreground = "c6c8d1";
  41. selection-background = "1e2132";
  42. selection-foreground = "c6c8d1";
  43. cursor-color = "#d2d4de";
  44. palette = [
  45. # black
  46. "0=#161821"
  47. "8=#6b7089"
  48. # red
  49. "1=#e27878"
  50. "9=#e98989"
  51. # green
  52. "2=#b4be82"
  53. "10=#c0ca8e"
  54. # yellow
  55. "3=#e2a478"
  56. "11=#e9b189"
  57. # blue
  58. "4=#84a0c6"
  59. "12=#91acd1"
  60. # magenta
  61. "5=#a093c7"
  62. "13=#ada0d3"
  63. # cyan
  64. "6=#89b8c2"
  65. "14=#95c4ce"
  66. # white
  67. "7=#c6c8d1"
  68. "15=#d2d4de"
  69. ];
  70. };
  71. };
  72. settings = {
  73. command = "${pkgs.lib.meta.getExe config.programs.fish.package}";
  74. background-opacity = 0.9;
  75. font-family = "FiraCode Nerd Font";
  76. font-size = 11.0;
  77. macos-titlebar-style = "hidden";
  78. theme = "catppuccin-mocha";
  79. window-padding-balance = true;
  80. window-padding-color = "extend";
  81. window-padding-x = 5;
  82. window-padding-y = 0;
  83. window-theme = "ghostty";
  84. };
  85. };
  86. }