From 1a1793f6d940d22c6e49753548c5b6cb7dc5545d Mon Sep 17 00:00:00 2001 From: "Nick K." Date: Sun, 4 May 2025 17:42:05 +0300 Subject: [PATCH] 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 --- modules/programs/ghostty.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/programs/ghostty.nix b/modules/programs/ghostty.nix index e0cd1f5f1..6890a63cb 100644 --- a/modules/programs/ghostty.nix +++ b/modules/programs/ghostty.nix @@ -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" ]; };