dotfiles/nixos/git/home.nix
Cyryl Płotnicki 9086c5f3a6
Some checks failed
use nix / build (push) Failing after 5m45s
disable lfs as it causes longs waits
2024-10-02 15:50:28 +01:00

44 lines
1.2 KiB
Nix

{
config,
pkgs,
inputs,
lib,
...
}: {
programs.git = {
enable = true;
lfs.enable = false;
userName = "Cyryl Płotnicki";
userEmail = lib.mkDefault "cyplo@cyplo.dev";
delta = {
enable = true;
options = {
line-numbers = true;
syntax-theme = "Solarized (dark)";
};
};
extraConfig = {
colour.ui = true;
core.fsmonitor = true;
credential = {helper = "cache";};
diff = {
algorithm = "histogram";
renameLimit = 2048;
renames = "copy";
};
help.autocorrect = 1;
init.defaultBranch = "main";
lfs."https://git.cyplo.dev/cyplo/dotfiles.git/info/lfs".locksverify = true;
merge.renamelimit = 8192;
mergetool.keepBackup = false;
pull.ff = "only";
push.default = "simple";
};
aliases = {
tree = "log --show-signature --color --decorate --date=short --all --graph -n 3";
newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2";
head = "log HEAD -n1";
vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
};
};
}