mirror of https://github.com/wlcx/home.git
Split git config, add mac-specific file
This commit is contained in:
parent
17b66b11fb
commit
6e6154210c
|
@ -56,44 +56,5 @@ in {
|
|||
|
||||
fzf.enable = true;
|
||||
|
||||
# Tools
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Sam Willcocks";
|
||||
userEmail = "sam@wlcx.cc";
|
||||
|
||||
delta = { # Better diffs
|
||||
enable = true;
|
||||
options = { line-numbers = true; };
|
||||
};
|
||||
|
||||
aliases = {
|
||||
a = "add";
|
||||
ap = "add -p";
|
||||
c = "commit";
|
||||
can = "commit --amend --no-edit";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
l = "log";
|
||||
lp = "log --patch";
|
||||
r = "rebase";
|
||||
rc = "rebase --continue";
|
||||
ra = "rebase --autostash";
|
||||
rai = "rebase --autostash --interactive";
|
||||
st = "status";
|
||||
|
||||
gone = ''
|
||||
! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | a
|
||||
│ wk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"'';
|
||||
};
|
||||
extraConfig = {
|
||||
branch.sort = "-committerdate";
|
||||
log.showSignature = true;
|
||||
push.default = "current";
|
||||
include.path = "~/.gitconfig.local";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
{ ... }: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Sam Willcocks";
|
||||
userEmail = "sam@wlcx.cc";
|
||||
|
||||
delta = { # Better diffs
|
||||
enable = true;
|
||||
options = { line-numbers = true; };
|
||||
};
|
||||
|
||||
aliases = {
|
||||
a = "add";
|
||||
ap = "add -p";
|
||||
c = "commit";
|
||||
can = "commit --amend --no-edit";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
l = "log";
|
||||
lp = "log --patch";
|
||||
r = "rebase";
|
||||
rc = "rebase --continue";
|
||||
ra = "rebase --autostash";
|
||||
rai = "rebase --autostash --interactive";
|
||||
st = "status";
|
||||
|
||||
gone = ''
|
||||
! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | a
|
||||
│ wk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"'';
|
||||
};
|
||||
extraConfig = {
|
||||
branch.sort = "-committerdate";
|
||||
log.showSignature = true;
|
||||
push.default = "current";
|
||||
include.path = "~/.gitconfig.local";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
home.sessionVariables = {
|
||||
# Use secretive for SSH agent
|
||||
"SSH_AUTH_SOCK" =
|
||||
"/Users/$USERNAME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||||
};
|
||||
}
|
|
@ -1 +1 @@
|
|||
{ dev = { ... }: { imports = [ ./default.nix ]; }; }
|
||||
{ dev = { ... }: { imports = [ ./default.nix ./git.nix ./macs.nix ]; }; }
|
||||
|
|
Loading…
Reference in New Issue