nixos/modules/base/git.nix

32 lines
766 B
Nix
Raw Normal View History

2023-08-01 15:35:09 +02:00
{ home-manager, ... }: {
2023-08-25 00:57:42 +02:00
# Git version control system.
# https://nixos.wiki/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 = {
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;
};
};
};
}