From 142b5f2bf09ccc31dd1076273817b799673c2b94 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 17:35:38 -0800 Subject: [PATCH] feat(home): Lazygit --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/lazygit/default.nix | 39 +++++++++++++++++++++++ old/home/programs/lazygit.nix | 26 --------------- 3 files changed, 40 insertions(+), 26 deletions(-) create mode 100644 modules/home/programs/lazygit/default.nix delete mode 100644 old/home/programs/lazygit.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index f20a43b..ef0d8ad 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -31,6 +31,7 @@ in hyfetch = enabled; journalctl = enabled; just = enabled; + lazygit = enabled; neo = enabled; systemctl = enabled; }; diff --git a/modules/home/programs/lazygit/default.nix b/modules/home/programs/lazygit/default.nix new file mode 100644 index 0000000..c5e769d --- /dev/null +++ b/modules/home/programs/lazygit/default.nix @@ -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"; + }; + }; +} diff --git a/old/home/programs/lazygit.nix b/old/home/programs/lazygit.nix deleted file mode 100644 index eb18270..0000000 --- a/old/home/programs/lazygit.nix +++ /dev/null @@ -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"; - }; -}