about summary refs log tree commit diff
path: root/configs/shared/.config/nixpkgs/home.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configs/shared/.config/nixpkgs/home.nix')
-rw-r--r--configs/shared/.config/nixpkgs/home.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/configs/shared/.config/nixpkgs/home.nix b/configs/shared/.config/nixpkgs/home.nix
index 8307d6b86a29..29e80824efea 100644
--- a/configs/shared/.config/nixpkgs/home.nix
+++ b/configs/shared/.config/nixpkgs/home.nix
@@ -15,6 +15,27 @@
     path = builtins.toPath ~/home-manager;
   };
 
+  programs.git = {
+    enable = true;
+    userName = "William Carroll";
+    userEmail = "wpcarro@gmail.com";
+    aliases = {
+      today = "! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\"";
+      yday = "! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\"";
+      changed-files = "! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master)";
+      conflicts = "! git --no-pager diff --name-only --diff-filter=U";
+      unstage = "reset HEAD --";
+    };
+    extraConfig = {
+      push.default = "current";
+      rebase = {
+        autosquash = true;
+        autostash = true;
+      };
+      rerere.enabled = true;
+    };
+  };
+
   ##############################################################################
   # Services
   ##############################################################################