aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-17 23:35:45 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-09-17 23:35:45 +0530
commitaba78f26619e30bdb3634104a4bbe60b18bf541a (patch)
treeb79c254f0a240ddef533d02c2e9e43bb76eeff99
parentcfb09be4801c1d41eda9113531a08e9d9e54ac62 (diff)
downloadhome-manager-config-aba78f26619e30bdb3634104a4bbe60b18bf541a.tar.gz
home-manager-config-aba78f26619e30bdb3634104a4bbe60b18bf541a.zip
Fixed the git configuration and its credential helper.
-rw-r--r--git/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/git/default.nix b/git/default.nix
index 8854e2f..973b4b6 100644
--- a/git/default.nix
+++ b/git/default.nix
@@ -1,8 +1,14 @@
-{ ... }:
+{ lib, ... }:
{
programs.git.enable = true;
programs.git.userEmail = "54011232+arpitchakladar@users.noreply.github.com";
programs.git.userName = "Arpit Chakladar";
- programs.git.extraConfig.credential.helper = "store --file ~/.cache/git/credential";
+ programs.git.extraConfig = {
+ credential.helper = "store --file $HOME/.cache/git/credential";
+ core.askPass = "";
+ };
+
+ # The base directory of the credential file must exist
+ home.activation.createGitCacheDirectory = lib.hm.dag.entryAfter [ "writeBoundary" ] "mkdir -p $HOME/.cache/git";
}