mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-29 21:51:01 +01:00
Add a programs.gh.hosts option that -- similar to programs.gh.settings -- gives structured access to $XDG_CONFIG_HOME/gh/hosts.yml.
18 lines
379 B
Nix
18 lines
379 B
Nix
{
|
|
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
|
|
''}
|
|
'';
|
|
}
|