Personal Nix setup

Update git config

Changed files
+16 -16
home
base
+16 -16
home/base/git.nix
···
programs.git = {
enable = true;
-
userName = cfg.user.name;
-
userEmail = cfg.user.email;
signing = mkIf (cfg.signingKey != null) {
signByDefault = true;
···
enable = true;
};
-
aliases = {
-
s = "status -s";
-
last = "log -1";
-
lol = "log --pretty=longline --decorate --date=relative";
-
lrel = "log --pretty=longline --pretty=longline --graph --decorate --date=relative --boundary remotes/origin/HEAD...HEAD";
-
lloc = "log --pretty=longline --graph --decorate --date=relative --boundary ^remotes/origin/HEAD HEAD";
-
recommit = "commit -a --amend --no-edit";
-
pushf = "push --force-with-lease";
-
glog = "log --pretty=longline --decorate --all --graph --date=relative";
-
base = "!f() { git cherry remotes/origin/HEAD HEAD | awk '/^\\+/ {print $2;exit}'; }; f";
-
journal = "!f() { git commit -a -m \"$(date +'%Y-%m-%d %H:%M:%S')\"; }; f";
-
get = "!f() { git clone \"git@github.com:$1.git\" \"$HOME/git/$1\" --no-single-branch --shallow-since=\"1 year ago\"; }; f";
-
};
-
extraConfig = {
commit.gpgSign = true;
tag.gpgSign = true;
push.gpgSign = "if-asked";
···
programs.git = {
enable = true;
signing = mkIf (cfg.signingKey != null) {
signByDefault = true;
···
enable = true;
};
+
settings = {
+
user = cfg.user;
+
alias = {
+
s = "status -s";
+
last = "log -1";
+
lol = "log --pretty=longline --decorate --date=relative";
+
lrel = "log --pretty=longline --pretty=longline --graph --decorate --date=relative --boundary remotes/origin/HEAD...HEAD";
+
lloc = "log --pretty=longline --graph --decorate --date=relative --boundary ^remotes/origin/HEAD HEAD";
+
recommit = "commit -a --amend --no-edit";
+
pushf = "push --force-with-lease";
+
glog = "log --pretty=longline --decorate --all --graph --date=relative";
+
base = "!f() { git cherry remotes/origin/HEAD HEAD | awk '/^\\+/ {print $2;exit}'; }; f";
+
journal = "!f() { git commit -a -m \"$(date +'%Y-%m-%d %H:%M:%S')\"; }; f";
+
get = "!f() { git clone \"git@github.com:$1.git\" \"$HOME/git/$1\" --no-single-branch --shallow-since=\"1 year ago\"; }; f";
+
};
+
commit.gpgSign = true;
tag.gpgSign = true;
push.gpgSign = "if-asked";