ghostty: fix config syntax file location on darwin (#6970)

Home Manager creates broken link to the Ghostty config
syntax highlighting definition file, because it has different location
on Darwin. This commit updates path to the config for Darwin users.

Fixes #6961
This commit is contained in:
Nick K.
2025-05-04 17:42:05 +03:00
committed by GitHub
parent 8167af657c
commit 1a1793f6d9

View File

@@ -185,7 +185,11 @@ in
programs.bat = lib.mkIf (cfg.package != null) {
syntaxes.ghostty = {
src = cfg.package;
file = "share/bat/syntaxes/ghostty.sublime-syntax";
file =
if pkgs.stdenv.hostPlatform.isDarwin then
"Applications/Ghostty.app/Contents/Resources/bat/syntaxes/ghostty.sublime-syntax"
else
"share/bat/syntaxes/ghostty.sublime-syntax";
};
config.map-syntax = [ "${config.xdg.configHome}/ghostty/config:Ghostty Config" ];
};