marleyos/modules/home/programs/lazygit/default.nix
2024-11-16 19:38:56 -08:00

39 lines
801 B
Nix

{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.lazygit;
has-delta = config.programs.git.delta.enable;
has-difft = config.programs.git.difftastic.enable;
in
{
options = mkEnableModule "programs.lazygit";
config = mkIf cfg.enable {
programs.lazygit = {
enable = true;
settings = {
gui.nerdFontsVersion = 3;
git.paging = {
colorArg = "always";
pager = lib.mkIf has-delta "delta --paging=never --features=arctic-fox";
externalDiffCommand = lib.mkIf has-difft "difft --color=always --display=inline";
};
os.editPreset = "nvim-remote";
};
};
home.shellAbbrs = {
lzg = "lazygit";
};
};
}