feat(home): Lazygit
This commit is contained in:
parent
90ff62dc7b
commit
142b5f2bf0
3 changed files with 40 additions and 26 deletions
|
@ -31,6 +31,7 @@ in
|
|||
hyfetch = enabled;
|
||||
journalctl = enabled;
|
||||
just = enabled;
|
||||
lazygit = enabled;
|
||||
neo = enabled;
|
||||
systemctl = enabled;
|
||||
};
|
||||
|
|
39
modules/home/programs/lazygit/default.nix
Normal file
39
modules/home/programs/lazygit/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue