about summary refs log tree commit diff
path: root/programs/git.nix
diff options
context:
space:
mode:
Diffstat (limited to 'programs/git.nix')
-rwxr-xr-xprograms/git.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/programs/git.nix b/programs/git.nix
new file mode 100755
index 0000000..f773a82
--- /dev/null
+++ b/programs/git.nix
@@ -0,0 +1,20 @@
+{
+  programs.git = {
+    enable = true;
+    userName = "Patryk Niedźwiedziński";
+    userEmail = "pniedzwiedzinski19@gmail.com";
+    signing = {
+      key = "pniedzwiedzinski19@gmail.com";
+      signByDefault = true;
+    };
+    aliases = {
+      lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
+    };
+
+    extraConfig = {
+      url."ssh://git@github.com/".insteadOf = "https://github.com/";
+      url."ssh://git@gitlab.com/".insteadOf = "https://gitlab.com/";
+      url."ssh://git@bitbucket.org/".insteadOf = "https://bitbucket.org/";
+    };
+  };
+}