From 66f4ea170093b62f319f41cebd2337a51b225c5a Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Tue, 6 Aug 2024 22:22:14 -0400 Subject: [PATCH] fix(home-manager/lazygit): avoid IFD (#304) --- modules/home-manager/lazygit.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/home-manager/lazygit.nix b/modules/home-manager/lazygit.nix index 8e1a00d..25153cb 100644 --- a/modules/home-manager/lazygit.nix +++ b/modules/home-manager/lazygit.nix @@ -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"; }; }