nixos-config/modules/applications/github.nix

25 lines
640 B
Nix
Raw Normal View History

2021-06-09 21:49:51 +04:00
{ pkgs, config, ... }: {
secrets.github_token = {
owner = "balsoft";
services = [ ];
};
home-manager.users.balsoft = {
home.packages = let
stateless-github-cli = pkgs.writeShellScriptBin "gh" ''
export GITHUB_TOKEN="''${GITHUB_TOKEN-$(cat ${config.secrets.github_token.decrypted})}"
exec ${pkgs.github-cli}/bin/gh "$@"
'';
in [ stateless-github-cli ];
xdg.configFile."gh/config.yaml".text = builtins.toJSON {
git_protocol = "https";
editor = "";
aliases = {
pv = "pr view --comments";
pcr = "pr create -r serokell/operations";
};
};
};
}