1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-29 21:51:01 +01:00
home-manager/tests/modules/programs/gh/hosts-file.nix
Benedikt M. Rips 6f974faa19
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.
2025-04-28 10:12:47 -05:00

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
''}
'';
}