{ config, pkgs, lib, flakeRoot, ... }: let catppuccinMochaConf = builtins.readFile (flakeRoot + "/assets/conf/dev/terminal/Catppuccin-Mocha.conf"); # Your own keymaps / other settings (but we will NOT rely on it for opacity) repoKittyConfText = builtins.readFile (flakeRoot + "/assets/conf/dev/terminal/kitty.conf"); in { xdg.enable = true; # Stable theme file so kitty.conf can include it without /nix/store paths xdg.configFile."kitty/themes/Catppuccin-Mocha.conf".text = catppuccinMochaConf; programs.kitty = { enable = true; # Home Manager generates ~/.config/kitty/kitty.conf; we append in-order: # 1) include theme # 2) your repo config (keymaps etc.) # 3) force opacity LAST so it always wins extraConfig = '' # 1) Theme first (stable path) include themes/Catppuccin-Mocha.conf # 2) Your repo config (may also include theme; harmless if duplicated) ${repoKittyConfText} # 3) Force transparency last (wins) #background_opacity 0.60 #dynamic_background_opacity yes ''; }; }