make git use a package config option
This commit is contained in:
parent
fdf6231b63
commit
07592e2972
1 changed files with 7 additions and 3 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue