make git use a package config option

This commit is contained in:
Reid 2024-12-26 19:44:24 -08:00
parent fdf6231b63
commit 07592e2972
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD

View file

@ -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";