1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

refactor: move git to myuser and remove obsolete nix config entry

This commit is contained in:
oddlama 2023-09-05 00:53:00 +02:00
parent 7b26c45fb8
commit 28a629aa70
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 1 additions and 3 deletions

34
users/myuser/git.nix Normal file
View file

@ -0,0 +1,34 @@
{lib, ...}: {
# TODO use git-fuzzy.
# TODO integrate git-fuzzy and difft
programs.gitui.enable = true;
programs.git = {
enable = true;
difftastic.enable = true;
lfs.enable = lib.mkDefault false;
extraConfig = {
difftool.prompt = true;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
mergetool.prompt = true;
pull.rebase = true;
};
aliases = {
unstash = "stash pop";
s = "status";
tags = "tag -l";
t = "tag -s -m ''";
ci = "commit -v -S";
cam = "commit -v -S --amend";
fixup = ''!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET ''${@:2} && EDITOR=true git rebase -i --gpg-sign --autostash --autosquash $TARGET^; }; f'';
};
};
home.shellAliases = rec {
g = "gitui";
gs = "git status";
ga = "git add";
gc = "git commit -v -S";
gca = "${gc} --amend";
};
}