From 30f8fea050f3242f0e6a2072779e706b5c8ceaf1 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 24 Sep 2026 03:42:25 +0530 Subject: refactor(modules): introduce cfg local bindings and submodule option types --- modules/development/lazygit/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/development/lazygit') diff --git a/modules/development/lazygit/default.nix b/modules/development/lazygit/default.nix index c2e6be8..95d2bf1 100644 --- a/modules/development/lazygit/default.nix +++ b/modules/development/lazygit/default.nix @@ -6,6 +6,7 @@ ... }: let + cfg = config.development.lazygit; base16Colors = import ../../colors/base16 { inherit config lib pkgs; }; in { @@ -22,7 +23,7 @@ in }; }; config = lib.mkMerge [ - (lib.mkIf config.development.lazygit.enable { + (lib.mkIf cfg.enable { programs.lazygit = { enable = true; enableBashIntegration = false; @@ -66,9 +67,9 @@ in commitHashLength = 4; showBranchCommitHash = true; showDivergenceFromBaseBranch = "arrowAndNumber"; - autoFetch = false; }; git = { + autoFetch = false; overrideGpg = config.security.gpg.enable; diffRenderers = lib.mkIf config.development.delta.enable [ { @@ -85,10 +86,10 @@ in source = ../../../assets/icons/apps/git.svg; }; }) - (lib.mkIf (config.development.lazygit.enable && config.terminal.kitty.enable) { + (lib.mkIf (cfg.enable && config.terminal.kitty.enable) { xdg.desktopEntries."lazygit" = { name = "lazygit"; - exec = "${lib.getExe config.terminal.kitty.package} --class lazygit -e ${lib.getExe config.development.lazygit.package}"; + exec = "${lib.getExe config.terminal.kitty.package} --class lazygit -e ${lib.getExe cfg.package}"; icon = "git"; categories = [ "Development" ]; comment = "A simple terminal UI for git commands"; -- cgit v1.2.3