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 {
|
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";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue