diff --git a/flake.nix b/flake.nix index 5b1b444..e9b8ef7 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ nerd-fonts.jetbrains-mono gitui ncdu + git-credential-oauth ]; fonts.fontconfig.enable = true; diff --git a/modules/git.nix b/modules/git.nix index 6492a3a..802eb90 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,6 +1,10 @@ { config, pkgs, ... }: { + # Enable git-credential-oauth for GitHub, GitLab, BitBucket + programs.git-credential-oauth = { + enable = true; + }; programs.git = { enable = true; @@ -79,7 +83,17 @@ ]; extraConfig = { - credential.helper = ""; + # Platform-specific credential configuration + credential = { + # OAuth platforms (handled by git-credential-oauth) + "https://github.com".helper = "oauth"; + "https://gitlab.com".helper = "oauth"; + "https://bitbucket.org".helper = "oauth"; + + # Token-based platforms + "https://git.overleaf.com".helper = "store"; + "https://git.overleaf.com".username = "git"; + }; core = { editor = "nvim";