1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-12 03:59:49 +01:00
home-manager/modules/programs/git-credential-oauth.nix

26 lines
552 B
Nix
Raw Normal View History

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 = {
enable =
lib.mkEnableOption (lib.mdDoc "Git authentication handler for OAuth");
2023-06-12 05:23:46 +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" ];
};
}