Skip to content

Commit

Permalink
fix(home-manager): update paths from new lazygit theme revision
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Nov 2, 2023
1 parent d0c74e6 commit cecf37c
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions modules/home-manager/lazygit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@
, ...
}:
let
inherit (lib) ctp;
cfg = config.programs.lazygit.catppuccin;
enable = cfg.enable && config.programs.lazygit.enable;

themePath = "/${cfg.flavour}/${cfg.accent}.yml";
in
{
options.programs.lazygit.catppuccin =
lib.ctp.mkCatppuccinOpt "lazygit" config;
lib.ctp.mkCatppuccinOpt "lazygit" config // {
accent = ctp.mkAccentOpt "lazygit" config;

};

config = lib.mkIf enable {

config.programs.lazygit.settings =
let
file = "${sources.lazygit}/themes/${cfg.flavour}.yml";
in
lib.mkIf enable (lib.ctp.fromYaml pkgs file);
programs.lazygit.settings =
let
file = "${sources.lazygit}/themes/${themePath}";
in
lib.ctp.fromYaml pkgs file;
};
}

0 comments on commit cecf37c

Please sign in to comment.