37 lines
983 B
Nix
37 lines
983 B
Nix
{ config, lib, ... }: {
|
|
|
|
options.homeconfig.git.enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
config = lib.mkIf config.homeconfig.git.enable {
|
|
|
|
#sops.secrets."git/username" = {};
|
|
#sops.secrets."git/email" = {};
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
|
|
userName._secret = "${config.sops.secrets."git/username".path}";
|
|
userEmail._secret = "${config.sops.secrets."git/email".path}";
|
|
|
|
#userName = "Nathan";
|
|
#userEmail = "nathanblunkall5@gmail.com";
|
|
|
|
extraConfig = {
|
|
init = {
|
|
defaultBranch = "master";
|
|
};
|
|
url = {
|
|
"ssh://gitea@gitea.blunkall.us/" = {
|
|
insteadOf = [
|
|
"blunkall:"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|