Refactor git module
Make dependencies explicit Remove packages from user config
This commit is contained in:
parent
40b0169b2b
commit
da40eb7dbc
3 changed files with 2 additions and 8 deletions
|
|
@ -1,10 +1,6 @@
|
|||
{ nixosConfig, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
fzf
|
||||
gitAndTools.diff-so-fancy
|
||||
];
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
|
|
@ -16,7 +12,7 @@
|
|||
};
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
core.pager = "diff-so-fancy | less --tabs=4 -RFX";
|
||||
core.pager = "${pkgs.diff-so-fancy}/bin/diff-so-fancy | less --tabs=4 -RFX";
|
||||
diff.sops.textconv = "${pkgs.sops}/bin/sops -d";
|
||||
pull.ff = "only";
|
||||
alias.find-merge = "!sh -c 'commit=$0 && branch=\${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'";
|
||||
|
|
@ -102,7 +98,7 @@
|
|||
git_pick-commit_merge-base_origin_master = {
|
||||
description = "fuzzy find a commit hash";
|
||||
body = ''
|
||||
git log --oneline (git merge-base HEAD origin/master)..HEAD | fzf --preview='git show (echo {} | cut -d" " -f 1)' --preview-window=top:75% | cut -d" " -f 1
|
||||
git log --oneline (git merge-base HEAD origin/master)..HEAD | ${pkgs.fzf}/bin/fzf --preview='git show (echo {} | cut -d" " -f 1)' --preview-window=top:75% | cut -d" " -f 1
|
||||
'';
|
||||
};
|
||||
gfix = {
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ in
|
|||
exa
|
||||
gcr # required for pinentry-gnome
|
||||
geeqie
|
||||
gitAndTools.diff-so-fancy
|
||||
gnupg
|
||||
khal
|
||||
lsof
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@
|
|||
exa
|
||||
gcr # required for pinentry-gnome
|
||||
geeqie
|
||||
gitAndTools.diff-so-fancy
|
||||
gnupg
|
||||
khal
|
||||
lsof
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue