2023-06-12 05:23:46 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.git-credential-oauth;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ lib.maintainers.tomodachi94 ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.git-credential-oauth = {
|
2023-07-01 01:30:13 +02:00
|
|
|
enable =
|
|
|
|
lib.mkEnableOption (lib.mdDoc "Git authentication handler for OAuth");
|
2023-06-12 05:23:46 +02:00
|
|
|
|
2023-07-01 11:41:32 +02:00
|
|
|
package = lib.mkPackageOptionMD pkgs "git-credential-oauth" { };
|
2023-06-12 05:23:46 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home.packages = [ cfg.package ];
|
|
|
|
|
|
|
|
programs.git.extraConfig.credential.helper =
|
|
|
|
[ "${cfg.package}/bin/git-credential-oauth" ];
|
|
|
|
};
|
|
|
|
}
|