dotfiles/modules/shell/github.nix

35 lines
796 B
Nix
Raw Normal View History

2022-04-30 16:07:58 +00:00
{ pkgs, identity, ... }: {
2022-04-28 23:20:46 +00:00
imports = [ ./git.nix ];
2022-04-30 16:07:58 +00:00
home-manager.users.${identity.user} = {
programs.gh = {
enable = true;
enableGitCredentialHelper = true;
settings.git_protocol = "https";
};
2022-04-28 23:20:46 +00:00
2022-04-30 14:21:43 +00:00
programs.fish = {
shellAbbrs = {
ghr = "gh repo view -w";
gha =
"gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view";
grw = "gh run watch";
grf = "gh run view --log-failed";
grl = "gh run view --log";
};
functions = {
repos = {
description = "Clone GitHub repositories";
argumentNames = "organization";
body = ''
set directory (gh-repos $organization)
and cd $directory
'';
};
};
};
2022-04-28 23:20:46 +00:00
};
}