nixos/modules/base/git.nix

39 lines
1 KiB
Nix
Raw Normal View History

2024-03-05 22:57:41 +01:00
{home-manager, ...}: {
2023-08-25 00:57:42 +02:00
# Git version control system.
2024-06-27 20:37:34 +02:00
# https://wiki.nixos.org/wiki/Git
2023-08-01 15:35:09 +02:00
home-manager.users.caspervk = {
programs.git = {
enable = true;
userName = "Casper V. Kristensen";
userEmail = "casper@vkristensen.dk";
2023-08-25 00:57:42 +02:00
# Delta is a syntax-highlighting pager for git, diff, and grep output
# https://github.com/dandavison/delta
2023-08-01 15:35:09 +02:00
delta = {
enable = true;
2023-08-04 13:13:21 +02:00
options = {
line-numbers = true;
side-by-side = true;
};
2023-08-01 15:35:09 +02:00
};
extraConfig = {
2024-08-18 18:12:59 +02:00
diff.algorithm = "histogram";
2023-08-04 13:13:21 +02:00
diff.colorMoved = "default";
2023-08-01 15:35:09 +02:00
init.defaultBranch = "master";
pull.rebase = true;
2023-10-09 14:35:26 +02:00
push.autoSetupRemote = true;
2023-08-01 15:35:09 +02:00
rebase.autoSquash = true;
rebase.autoStash = true;
2024-04-15 18:23:50 +02:00
rebase.updateRefs = true;
2023-08-01 15:35:09 +02:00
};
2024-09-02 14:45:56 +02:00
aliases = {
# https://docs.gitlab.com/ee/user/project/push_options.html
mr = "push --push-option=merge_request.create --push-option=merge_request.assign='vk'";
};
2023-08-01 15:35:09 +02:00
};
};
}