forked from mirrors_public/oddlama_nix-config
refactor: move git to myuser and remove obsolete nix config entry
This commit is contained in:
parent
7b26c45fb8
commit
28a629aa70
3 changed files with 1 additions and 3 deletions
|
@ -32,6 +32,7 @@ in {
|
|||
./graphical
|
||||
./neovim
|
||||
|
||||
./git.nix
|
||||
./dev.nix
|
||||
./gpg.nix
|
||||
./ssh.nix
|
||||
|
|
34
users/myuser/git.nix
Normal file
34
users/myuser/git.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue