Skip to content

Commit

Permalink
fix(home-manager/lazygit): avoid IFD (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid authored Aug 7, 2024
1 parent dfef742 commit 66f4ea1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/home-manager/lazygit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}

0 comments on commit 66f4ea1

Please sign in to comment.