marleyos/modules/home/programs/lazygit/default.nix

38 lines
778 B
Nix
Raw Normal View History

2024-11-16 17:35:38 -08:00
{
lib,
config,
...
}:
let
inherit (lib) mkEnableOption mkIf;
2024-11-16 17:35:38 -08:00
cfg = config.marleyos.programs.lazygit;
2024-11-16 17:35:38 -08:00
has-delta = config.programs.git.delta.enable;
has-difft = config.programs.git.difftastic.enable;
in
{
options.marleyos.programs.lazygit.enable = mkEnableOption "lazygit";
2024-11-16 17:35:38 -08:00
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";
};
};
}