1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-09 18:41:06 +01:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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" ];
};