gh: add hosts option (#6925)
Add a programs.gh.hosts option that -- similar to programs.gh.settings -- gives structured access to $XDG_CONFIG_HOME/gh/hosts.yml.
This commit is contained in:
parent
69c60b035e
commit
6f974faa19
3 changed files with 32 additions and 3 deletions
|
|
@ -2,5 +2,6 @@
|
|||
gh-config-file = ./config-file.nix;
|
||||
gh-credential-helper = ./credential-helper.nix;
|
||||
gh-extensions = ./extensions.nix;
|
||||
gh-hosts-file = ./hosts-file.nix;
|
||||
gh-warnings = ./warnings.nix;
|
||||
}
|
||||
|
|
|
|||
18
tests/modules/programs/gh/hosts-file.nix
Normal file
18
tests/modules/programs/gh/hosts-file.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
hosts."github.com" = {
|
||||
git_protocol = "ssh";
|
||||
user = "my_username";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/gh/hosts.yml
|
||||
assertFileContent home-files/.config/gh/hosts.yml ${builtins.toFile "hosts.yml" ''
|
||||
github.com:
|
||||
git_protocol: ssh
|
||||
user: my_username
|
||||
''}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue