diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/development/delta/default.nix | 15 | ||||
| -rw-r--r-- | modules/development/git/default.nix | 49 | ||||
| -rw-r--r-- | modules/development/lazygit/default.nix | 6 |
3 files changed, 30 insertions, 40 deletions
diff --git a/modules/development/delta/default.nix b/modules/development/delta/default.nix index b35e5a6..e3daeb3 100644 --- a/modules/development/delta/default.nix +++ b/modules/development/delta/default.nix @@ -26,20 +26,5 @@ line-numbers-right-format = "{np}│ "; }; }; - - programs.git.settings = lib.mkIf config.development.git.enable { - core.pager = "delta"; - interactive.diffFilter = "delta --color-only"; - delta.navigate = true; - }; - - programs.lazygit.settings = lib.mkIf config.development.lazygit.enable { - git.pagers = [ - { - colorArg = "always"; - pager = "delta --paging=never {{diffArgs}}"; - } - ]; - }; }; } diff --git a/modules/development/git/default.nix b/modules/development/git/default.nix index e9580a0..beb88b2 100644 --- a/modules/development/git/default.nix +++ b/modules/development/git/default.nix @@ -45,37 +45,36 @@ }; config = lib.mkIf config.development.git.enable { - home.packages = with pkgs; [ - gawk - ]; - programs.git = { enable = true; signing = { key = config.development.git.signing.key; signByDefault = config.development.git.signing.signByDefault; }; - settings = - lib.recursiveUpdate - { - user = { - name = config.development.git.username; - email = config.development.git.email; - }; - core.askPass = ""; - log = { - showSignature = true; - }; - } - ( - lib.optionalAttrs config.development.git.useSSH { - url."git@github.com:".insteadOf = "https://github.com/"; - url."git@gitlab.com:".insteadOf = "https://gitlab.com/"; - url."git@bitbucket.org:".insteadOf = "https://bitbucket.org/"; - url."git@codeberg.org:".insteadOf = "https://codeberg.org/"; - url."git@git.sr.ht:".insteadOf = "https://git.sr.ht/"; - } - ); + settings = lib.mkMerge [ + { + user = { + name = config.development.git.username; + email = config.development.git.email; + }; + core.askPass = ""; + log.showSignature = true; + } + + (lib.optionalAttrs config.development.git.useSSH { + url."git@github.com:".insteadOf = "https://github.com/"; + url."git@gitlab.com:".insteadOf = "https://gitlab.com/"; + url."git@bitbucket.org:".insteadOf = "https://bitbucket.org/"; + url."git@codeberg.org:".insteadOf = "https://codeberg.org/"; + url."git@git.sr.ht:".insteadOf = "https://git.sr.ht/"; + }) + + (lib.optionalAttrs config.development.git.enable { + core.pager = "delta"; + interactive.diffFilter = "delta --color-only"; + delta.navigate = true; + }) + ]; }; }; } diff --git a/modules/development/lazygit/default.nix b/modules/development/lazygit/default.nix index a39a8b6..ea21841 100644 --- a/modules/development/lazygit/default.nix +++ b/modules/development/lazygit/default.nix @@ -63,6 +63,12 @@ }; git = { overrideGpg = true; + diffRenderers = [ + { + colorArg = "always"; + command = "delta --paging=never {{diffArgs}}"; + } + ]; }; update.method = "never"; }; |
