2024-11-16 17:35:38 -08:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-11-16 23:29:38 -08:00
|
|
|
inherit (lib) mkEnableOption mkIf;
|
2024-11-16 17:35:38 -08:00
|
|
|
|
2024-11-16 22:34:40 -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
|
|
|
|
{
|
2024-11-16 23:29:38 -08:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|