2024-08-20 05:17:35 -07:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2023-07-13 09:17:51 -07:00
|
|
|
let
|
2023-11-02 10:55:47 -07:00
|
|
|
inherit (lib) ctp;
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2024-08-20 05:17:35 -07:00
|
|
|
|
2023-07-13 09:17:51 -07:00
|
|
|
cfg = config.programs.lazygit.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.lazygit.enable;
|
2024-08-20 05:17:35 -07:00
|
|
|
|
|
|
|
# NOTE: On MacOS specifically, k9s expects its configuration to be in
|
|
|
|
# `~/Library/Application Support` when not using XDG
|
|
|
|
enableXdgConfig = !pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable;
|
|
|
|
|
|
|
|
configDirectory =
|
|
|
|
if enableXdgConfig then
|
|
|
|
config.xdg.configHome
|
|
|
|
else
|
|
|
|
"${config.home.homeDirectory}/Library/Application Support";
|
|
|
|
configFile = "${configDirectory}/lazygit/config.yml";
|
2023-07-13 09:17:51 -07:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt { name = "lazygit"; } // {
|
2024-05-21 14:53:46 -07:00
|
|
|
accent = ctp.mkAccentOpt "lazygit";
|
|
|
|
};
|
2023-11-02 10:55:47 -07:00
|
|
|
|
2024-08-06 19:22:14 -07:00
|
|
|
config.home.sessionVariables = lib.mkIf enable {
|
|
|
|
# Ensure that the default config file is still sourced
|
2024-08-20 05:17:35 -07:00
|
|
|
LG_CONFIG_FILE = "${sources.lazygit}/themes-mergable/${cfg.flavor}/${cfg.accent}.yml,${configFile}";
|
2023-11-02 10:55:47 -07:00
|
|
|
};
|
2023-06-19 08:14:19 -07:00
|
|
|
}
|