mirror of
https://github.com/nix-community/home-manager
synced 2024-12-20 08:49:47 +01:00
git-credential-oauth: add module
This commit is contained in:
parent
32376992f7
commit
194086df82
3 changed files with 32 additions and 0 deletions
|
@ -1094,6 +1094,13 @@ in
|
|||
may be necessary as new modules are added.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2023-06-14T21:25:34+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.git-credential-oauth'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ let
|
|||
./programs/getmail.nix
|
||||
./programs/gh.nix
|
||||
./programs/git-cliff.nix
|
||||
./programs/git-credential-oauth.nix
|
||||
./programs/git.nix
|
||||
./programs/gitui.nix
|
||||
./programs/gnome-terminal.nix
|
||||
|
|
24
modules/programs/git-credential-oauth.nix
Normal file
24
modules/programs/git-credential-oauth.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.git-credential-oauth;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ lib.maintainers.tomodachi94 ];
|
||||
|
||||
options = {
|
||||
programs.git-credential-oauth = {
|
||||
enable = lib.mkEnableOption "Git authentication handler for OAuth";
|
||||
|
||||
package = lib.mkPackageOption pkgs "git-credential-oauth" { };
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
programs.git.extraConfig.credential.helper =
|
||||
[ "${cfg.package}/bin/git-credential-oauth" ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue