summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-01-05 15:14:36 -0500
committerBen Sima <ben@bsima.me>2021-01-05 15:14:36 -0500
commitb4728c9b8fd362dd6efb8d0e57a3749a8a2e52ba (patch)
tree6ff7ba4ca0f2a36bc8a68d99ddb772390a945d35 /lib
parent78d6537a2bd8a3c8bbb467bb6da0b0c7d3dfcc05 (diff)
Organize my git nix config/aliases better
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix37
1 files changed, 32 insertions, 5 deletions
diff --git a/lib/common.nix b/lib/common.nix
index e49b0ee..dce2ed3 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -73,6 +73,37 @@ in
defaultCommand = "rg --files";
};
+ git = {
+ enable = true;
+ userName = "Ben Sima";
+ userEmail = "ben@bsima.me";
+ ignores = [ "*~" "*.swp" ];
+ package = pkgs.gitAndTools.gitFull;
+ signing = {
+ key = gpgid;
+ signByDefault = false;
+ };
+ aliases = {
+ authors = "shortlog -s -n";
+ slog = "log --stat";
+ glog = ''log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'';
+ };
+ extraConfig = {
+ push.default = "simple";
+ pull.rebase = "true";
+ commit.template = "${./git-commit-template}";
+ sendemail = {
+ #smtpuser = "ben@bsima.me";
+ #smtpserverport = 587;
+ smtpserver = "${homedir}/bin/sendmail";
+ chainreplyto = false;
+ composeencoding = "UTF-8";
+ annotate = "yes";
+ };
+ };
+
+ };
+
tmux = {
enable = true;
extraConfig = builtins.readFile ./tmux;
@@ -272,13 +303,11 @@ in
bind '"\C-g\C-r": "$(_gr)\e\C-e\er"'
'';
shellAliases = {
- add = "git add --ignore-removal";
day = "date +%a";
ddate = "date +%Y.%m.%d";
dday = "date +%A";
e = "emacsclient -nw"; # emacs in a terminal
f = "fossil";
- fetch = "git fetch";
g = "git";
ga = "git add -A";
gb = "git branch";
@@ -287,7 +316,6 @@ in
gco = "git checkout";
gd = "git diff";
gl = "git pull --prune";
- glog = ''git log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'';
gp = "git push origin HEAD";
gs = "git status -sb";
hs = "home-manager switch";
@@ -312,8 +340,7 @@ in
emacs = {
enable = true;
- # Disabling for spacemacs
- #extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
+ extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
};
};
}