nixos-config/modules/applications/github.nix

25 lines
638 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 {
2021-06-17 23:39:12 +04:00
git_protocol = "ssh";
2021-06-09 21:49:51 +04:00
editor = "";
aliases = {
pv = "pr view --comments";
pcr = "pr create -r serokell/operations";
};
};
};
}