44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.marleyos.programs.lazygit;
|
|
has-delta = config.programs.git.delta.enable;
|
|
has-difft = config.programs.git.difftastic.enable;
|
|
in {
|
|
options.marleyos.programs.lazygit.enable = lib.mkEnableOption "lazygit";
|
|
|
|
config = lib.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";
|
|
|
|
customCommands = [
|
|
{
|
|
key = "C";
|
|
command = "cz c";
|
|
description = "commit with commitizen";
|
|
context = "files";
|
|
loadingText = "opening commitizen tool";
|
|
subprocess = true;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
home.shellAbbrs = {
|
|
lzg = "lazygit";
|
|
};
|
|
};
|
|
}
|