Add stateless github configuration
This commit is contained in:
parent
cb89b80b3a
commit
31457afc53
24
modules/applications/github.nix
Normal file
24
modules/applications/github.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -14,7 +14,6 @@
|
||||
niv
|
||||
stdman
|
||||
libqalculate
|
||||
github-cli
|
||||
# Messaging
|
||||
libnotify
|
||||
# Audio/Video
|
||||
|
@ -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
|
||||
|
@ -13,6 +13,7 @@
|
||||
emacs
|
||||
firefox
|
||||
geary
|
||||
github
|
||||
himalaya
|
||||
nheko
|
||||
packages
|
||||
|
Loading…
Reference in New Issue
Block a user