summary refs log tree commit diff stats
path: root/user/settings/git.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings/git.nix')
-rw-r--r--user/settings/git.nix27
1 files changed, 23 insertions, 4 deletions
diff --git a/user/settings/git.nix b/user/settings/git.nix
index f53d33a9..18368864 100644
--- a/user/settings/git.nix
+++ b/user/settings/git.nix
@@ -14,6 +14,9 @@
       };
     };
     extraConfig = {
+      init = {
+        defaultBranch = "main";
+      };
       ghq = {
         root = "${config.home.homeDirectory}/projects";
         user = "alanpearce";
@@ -41,9 +44,6 @@
         algorithm = "patience";
         colorMoved = "default";
       };
-      "difftool.sopsdiffer" = {
-        textconf = "${pkgs.sops}/bin/sops -d";
-      };
       remote = {
         autoSetupMerge = true;
       };
@@ -75,8 +75,10 @@
       pending = "!sh -c 'git log --oneline --grep=\"#\" ...$(git lasttag)'";
       lg = "log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'";
       prl = "log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'  --grep='#'";
+      gen-ignore = "ignore-io";
       ignored = "ls-files --others -i --exclude-standard";
-      root = "rev-parse --show-toplevel";
+      clear = "clear-soft";
+      clear-hard = "!git-clear-hard";
     };
     ignores = [
       ".DS_Store"
@@ -87,4 +89,21 @@
       ".tabnine_root"
     ];
   };
+  programs.gh = {
+    enable = true;
+    settings = {
+      git_protocol = "ssh";
+      aliases = {
+        fork = "repo fork --remote --remote-name alanpearce --default-branch-only";
+      };
+    };
+  };
+  home.packages = with pkgs; [
+    git-extras # delete-merged-branches and friends
+    ghq
+    delta
+    gitui
+    gitstatus
+    hut # sourcehut tools
+  ];
 }