Commit e61d7556d56d

Vincent Demeester <vincent@sbr.pm>
2026-01-16 16:24:04
feat(gh): migrate to programs.gh with extensions
- Enable declarative gh configuration via home-manager - Add 5 gh extensions for enhanced GitHub workflow - Improve security by switching to SSH protocol Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 4918a5c
Changed files (1)
home
common
shell
home/common/shell/git.nix
@@ -48,12 +48,30 @@ in
   xdg.configFile."git/allowed_signers".text = allowedSigners;
   home.packages = with pkgs; [
     git-lfs
-    gh
     codeberg-cli
     mr
     delta
     difftastic
   ];
+
+  programs.gh = {
+    enable = true;
+    extensions = with pkgs; [
+      gh-copilot
+      gh-dash
+      gh-f
+      gh-poi
+      gh-s
+    ];
+    settings = {
+      git_protocol = "ssh";
+      prompt = "enabled";
+      editor = "emacsclient -t";
+      aliases = {
+        co = "pr checkout";
+      };
+    };
+  };
   programs.git = {
     enable = true;
     package = pkgs.git;
@@ -225,14 +243,6 @@ in
         navigate = true;
       };
 
-      credential = {
-        "https://github.com" = {
-          helper = "!${pkgs.gh}/bin/gh auth git-credential";
-        };
-        "https://gist.github.com" = {
-          helper = "!${pkgs.gh}/bin/gh auth git-credential";
-        };
-      };
       github.user = "vdemeester";
       "filter \"lfs\"" = {
         clean = "${pkgs.git-lfs}/bin/git-lfs clean -- %f";