configuration.nix/home/programs/git.nix

29 lines
538 B
Nix
Raw Normal View History

2023-07-01 17:45:08 +05:30
{
pkgs,
secrets,
...
}: let
user = secrets.users;
2023-05-18 16:11:26 +05:30
in {
2023-04-07 19:09:05 +05:30
programs.git = {
enable = true;
diff-so-fancy = {
enable = true;
};
2023-06-10 14:07:42 +05:30
userEmail =
if pkgs.stdenv.isLinux
then user.primary.emailAddress
else user.primary.workEmail;
2023-04-07 19:09:05 +05:30
userName = user.primary.realName;
signing = {
2023-06-02 23:40:36 +05:30
key = user.primary.pgpFingerprint;
2023-04-07 19:09:05 +05:30
signByDefault = true;
};
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
2023-05-18 16:11:26 +05:30
ignores = ["/.nix" "/.direnv"];
2023-04-07 19:09:05 +05:30
};
}