about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-26 16:28:05 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-12-26 16:28:05 +0100
commit11e47c5095dd802114895e1d66810ab11d1859a4 (patch)
tree4ed066276cda45b24a7f302f9912018e1582e0b1
parenta80614bddf6403bfd6b5b83416301883c23ca3bb (diff)
downloaddots-11e47c5095dd802114895e1d66810ab11d1859a4.tar.gz
dots-11e47c5095dd802114895e1d66810ab11d1859a4.zip
Add git config
-rwxr-xr-xusers/pn.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/users/pn.nix b/users/pn.nix
index 0dcccb6..1b503a9 100755
--- a/users/pn.nix
+++ b/users/pn.nix
@@ -1,4 +1,5 @@
 ## My default user
+{ pkgs, ... }:
 
 let
   home-manager = builtins.fetchTarball {
@@ -43,6 +44,34 @@ in
         '';
         scriptPath = ".xinitrc";
       };
+
+      programs.git = {
+        enable = true;
+        package = pkgs.gitAndTools.gitFull;
+        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@github.com/pniedzwiedzinski/".insteadOf = "pn:";
+          url."ssh://git@gitlab.com/".insteadOf = "https://gitlab.com/";
+          url."ssh://git@bitbucket.org/".insteadOf = "https://bitbucket.org/";
+
+          sendemail = {
+            smtpserver = "${pkgs.msmtp}/bin/msmtp";
+            smtpserveroption  = [ "-a" "pniedzwiedzinski19@gmail.com" ];
+          };
+        };
+      };
+
+
     };
 
   ## Although it's less secure I tend not to have sensitive data on my machines