- git : rerere, tri des branches/tags, commit.verbose, column.ui, diff.mnemonicPrefix - CLI : eza (alias ls/ll/lt), fd, lazygit, lazydocker, alias ff (fzf + aperçu bat), lzg/lzd - tmux : config de base (vi, souris, index 1, splits dans le cwd) - système : polices JetBrains Mono Nerd Font, Noto, emoji et CJK Non testé : pas de Nix sur la machine où ces changements ont été écrits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
86 lines
2.3 KiB
Nix
86 lines
2.3 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.gitui.enable = true;
|
|
programs.delta = {
|
|
enable = true;
|
|
enableGitIntegration = true;
|
|
options = {
|
|
navigate = true;
|
|
dark = true;
|
|
};
|
|
};
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
package = pkgs.gitFull;
|
|
|
|
ignores = [
|
|
".DS_Store"
|
|
".svn"
|
|
"*~"
|
|
"*.swp"
|
|
"*.rbc"
|
|
".watsonrc"
|
|
".idea"
|
|
".vscode"
|
|
"shell.nix"
|
|
".envrc"
|
|
".direnv"
|
|
".ddev"
|
|
"CLAUDE.local.md"
|
|
];
|
|
|
|
settings = {
|
|
alias = {
|
|
co = "checkout";
|
|
pushf = "push --force-with-lease --force-if-includes";
|
|
aimr = "log --pretty=format:'%s%n%b---'";
|
|
};
|
|
|
|
user = {
|
|
email = "pierre@front-commerce.com";
|
|
name = "Pierre Martin";
|
|
};
|
|
|
|
merge.conflictstyle = "zdiff3";
|
|
diff.colorMoved = "default";
|
|
|
|
merge.tool = "meld";
|
|
diff.external = "difft";
|
|
diff.algorithm = "patience";
|
|
pull.ff = "only";
|
|
credential.helper = "store";
|
|
init.defaultBranch = "main";
|
|
|
|
# see https://betterprogramming.pub/8-advanced-git-commands-university-wont-teach-you-fe63b483d34b
|
|
help.autocorrect = 1;
|
|
fetch.prune = true;
|
|
push.autoSetupRemote = true;
|
|
|
|
# see https://michaelheap.com/git-ignore-rev/
|
|
# Not activated globally because it throws errors if the file is not present.
|
|
# Enable it in a specific repository if needed.
|
|
# blame.ignoreRevsFile = ".git-blame-ignore-revs";
|
|
|
|
# see https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/
|
|
rebase.updateRefs = true;
|
|
|
|
# Repris d'Omarchy - https://github.com/basecamp/omarchy/blob/master/config/git/config
|
|
rerere = {
|
|
enabled = true; # mémorise la résolution des conflits…
|
|
autoupdate = true; # … et la réapplique automatiquement
|
|
};
|
|
branch.sort = "-committerdate"; # branches les plus récentes en premier
|
|
tag.sort = "-version:refname"; # tri des tags par version (v1.10 après v1.9)
|
|
column.ui = "auto";
|
|
commit.verbose = true; # diff affiché dans l'éditeur du message de commit
|
|
diff.mnemonicPrefix = true; # préfixes i/ w/ c/ au lieu de a/ b/
|
|
|
|
"url \"git@gitlab.lundimatin.app:\"" = {
|
|
insteadOf = "https://gitlab.lundimatin.app/";
|
|
};
|
|
};
|
|
};
|
|
}
|