From 07592e29726e082519a9be2a1763a43164db07b7 Mon Sep 17 00:00:00 2001 From: reidlab Date: Thu, 26 Dec 2024 19:44:24 -0800 Subject: [PATCH] make git use a package config option --- modules/software/dev/git.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/software/dev/git.nix b/modules/software/dev/git.nix index 80c5372..51f5e42 100644 --- a/modules/software/dev/git.nix +++ b/modules/software/dev/git.nix @@ -6,12 +6,17 @@ let in { options.modules.software.dev.git = { enable = mkEnableOption "Enable git. You know what git is"; + package = mkOption { + type = types.package; + default = pkgs.gitFull; + example = "pkgs.gitFull"; + }; }; config = mkIf cfg.enable { hm.programs.git = { enable = true; - package = pkgs.gitFull; + package = cfg.package; userName = ''reidlab''; userEmail = "reidlab325@gmail.com"; @@ -44,8 +49,7 @@ in { }; extraConfig = { - # password caching w libsecret, use gnome-keyring or kwallet - credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; + credential.helper = "${cfg.package}/bin/git-credential-libsecret"; push.autoSetupRemote = true; push.gpgSign = "if-asked";