feat(home): Lazygit

This commit is contained in:
punkfairie 2024-11-16 17:35:38 -08:00
parent 90ff62dc7b
commit 142b5f2bf0
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 40 additions and 26 deletions

View file

@ -31,6 +31,7 @@ in
hyfetch = enabled;
journalctl = enabled;
just = enabled;
lazygit = enabled;
neo = enabled;
systemctl = enabled;
};

View file

@ -0,0 +1,39 @@
{
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";
};
};
}

View file

@ -1,26 +0,0 @@
{ config, lib, ... }:
let
has-delta = config.programs.git.delta.enable;
has-difftastic = config.programs.git.difftastic.enable;
in
{
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-difftastic "difft --color=always --display=inline";
};
os.editPreset = "nvim-remote";
};
};
home.shellAbbrs = {
lzg = "lazygit";
};
}