From ffa37b9b3e12cc3cb3fd558c047894e7b75e9c81 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 4 Jul 2023 20:25:31 +0200 Subject: [PATCH] git: git-credential-manager --- home-manager/modules/git/default.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/home-manager/modules/git/default.nix b/home-manager/modules/git/default.nix index c4807de..516792c 100644 --- a/home-manager/modules/git/default.nix +++ b/home-manager/modules/git/default.nix @@ -78,7 +78,25 @@ in }; extraConfig = { - credential.helper = "${config.programs.git.package.override {withLibsecret = true;}}/bin/git-credential-libsecret"; + # credential.helper = "${config.programs.git.package.override {withLibsecret = true;}}/bin/git-credential-libsecret"; + credential = { + helper = "${pkgs.git-credential-manager}/bin/git-credential-manager"; + credentialStore = "secretservice"; + + "https://dev.azure.com" = { + useHttpPath = true; + }; + + "https://git.datarift.nl" = { + provider = "generic"; + oauthClientId = "3ae2eee7-1c52-4950-846e-17de716cfe77"; + oauthClientSecret = "gto_tgalquoafnphcly4meztaxnfb3p2sq2aajksp7a2d4iu66c3ro2a"; + oauthRedirectUri = "http://127.0.0.1:42069/"; + oauthAuthorizeEndpoint = "/login/oauth/authorize"; + oauthTokenEndpoint = "/login/oauth/access_token"; + oauthScopes = "read:user repo"; + }; + }; init = { defaultBranch = "main"; }; @@ -150,5 +168,7 @@ in browser = ""; }; }; + + home.packages = [ pkgs.git-credential-manager ]; }; }