mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
4fd794d3df
* gh: option to enable helper for additional hosts `gh` can also be used with github enterprise hosts, for which there exists no easy option to enable the credential helper except for directly working with `programs.git.extraConfig`. Not sure if this is a needed addition since it's somewhat niche, at the same time it's not very complex and makes the life of github enterprise a little easier. * gh: update credential-helper tests * gh: refactor credential helper option this moves from `enableGitCredentialHelper` to `gitCredentialHelper.enable` and `gitCredentialHelper.hosts`. * gh: lib.mkIf -> mkIf
21 lines
423 B
Nix
21 lines
423 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
programs.gh = {
|
|
enable = true;
|
|
gitCredentialHelper = {
|
|
enable = true;
|
|
hosts = [ "https://github.com" "https://github.example.com" ];
|
|
};
|
|
};
|
|
|
|
programs.git.enable = true;
|
|
|
|
test.stubs.gh = { };
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/git/config
|
|
assertFileContent home-files/.config/git/config \
|
|
${./credential-helper.git.conf}
|
|
'';
|
|
}
|