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 { in {
options.modules.software.dev.git = { options.modules.software.dev.git = {
enable = mkEnableOption "Enable git. You know what git is"; enable = mkEnableOption "Enable git. You know what git is";
package = mkOption {
type = types.package;
default = pkgs.gitFull;
example = "pkgs.gitFull";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
hm.programs.git = { hm.programs.git = {
enable = true; enable = true;
package = pkgs.gitFull; package = cfg.package;
userName = ''reidlab''; userName = ''reidlab'';
userEmail = "reidlab325@gmail.com"; userEmail = "reidlab325@gmail.com";
@ -44,8 +49,7 @@ in {
}; };
extraConfig = { extraConfig = {
# password caching w libsecret, use gnome-keyring or kwallet credential.helper = "${cfg.package}/bin/git-credential-libsecret";
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
push.autoSetupRemote = true; push.autoSetupRemote = true;
push.gpgSign = "if-asked"; push.gpgSign = "if-asked";