From 63eb82868b1e76af322ecb699823097b5c335a28 Mon Sep 17 00:00:00 2001 From: jeirmeister Date: Wed, 30 Oct 2024 03:14:08 -0700 Subject: [PATCH] - Proper fix for git credential manager, seems to be detecting the binary --- users/jeirmeister/programs/git.nix | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/users/jeirmeister/programs/git.nix b/users/jeirmeister/programs/git.nix index f877057..f09cf93 100644 --- a/users/jeirmeister/programs/git.nix +++ b/users/jeirmeister/programs/git.nix @@ -1,18 +1,23 @@ -# users/jeirmeister/programs/git.nix { config, pkgs, ... }: { programs.git = { enable = true; - package = pkgs.git.override { withLibsecret = true; }; lfs.enable = true; userName = "jeirmeister"; userEmail = "jeir@jeirslab.xyz"; + extraConfig = { init.defaultBranch = "main"; pull.rebase = false; - credential.helper = "${pkgs.libsecret}/bin/git-credential-libsecret"; + + # Configure credential helper + credential = { + helper = "${pkgs.git-credential-manager}/bin/git-credential-manager"; + useHttpPath = true; + }; }; + ignores = [ ".DS_Store" "*.swp" @@ -20,4 +25,16 @@ ".idea/" ]; }; -} + + # Ensure required KDE packages are installed + home.packages = with pkgs; [ + git-credential-manager + ksshaskpass + ]; + + # Set environment variables for KDE integration + home.sessionVariables = { + GIT_ASKPASS = "${pkgs.ksshaskpass}/bin/ksshaskpass"; + SSH_ASKPASS = "${pkgs.ksshaskpass}/bin/ksshaskpass"; + }; +} \ No newline at end of file