Add stateless github configuration

This commit is contained in:
Alexander Bantyev 2021-06-09 20:49:51 +03:00
parent cb89b80b3a
commit 31457afc53
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
4 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,24 @@
{ 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";
};
};
};
}

View File

@ -14,7 +14,6 @@
niv
stdman
libqalculate
github-cli
# Messaging
libnotify
# Audio/Video

View File

@ -10,6 +10,7 @@ builtins.listToAttrs (builtins.map (path: {
./applications/emacs
./applications/firefox.nix
./applications/geary.nix
./applications/github.nix
./applications/himalaya.nix
./applications/nheko.nix
./applications/okular.nix

View File

@ -13,6 +13,7 @@
emacs
firefox
geary
github
himalaya
nheko
packages