fix(home-manager/lazygit): avoid IFD (#304)

This commit is contained in:
Anomalocaridid 2024-08-06 22:22:14 -04:00 committed by GitHub
parent dfef742dd2
commit 66f4ea1700
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,15 +4,14 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.lazygit.catppuccin;
enable = cfg.enable && config.programs.lazygit.enable;
themePath = "${cfg.flavor}/${cfg.accent}.yml";
in
{
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt { name = "lazygit"; } // {
accent = ctp.mkAccentOpt "lazygit";
};
config = lib.mkIf enable {
programs.lazygit.settings = lib.ctp.fromYaml "${sources.lazygit}/themes-mergable/${themePath}";
config.home.sessionVariables = lib.mkIf enable {
# Ensure that the default config file is still sourced
LG_CONFIG_FILE = "${sources.lazygit}/themes-mergable/${cfg.flavor}/${cfg.accent}.yml,${config.xdg.configHome}/lazygit/config.yml";
};
}