nixos-config/users/simon/modules/zsh/pass-wrappers.zsh

19 lines
517 B
Bash

function pass-field() {
pass show "$1" | grep "$2" | cut -d: -f2- | tr -d ' '
}
function drone() (
export DRONE_SERVER="$(pass-field sbruder.de/drone Server)"
export DRONE_TOKEN="$(pass sbruder.de/drone | head -n 1)"
command drone $@
)
function drone-add-netlify() {
drone secret add --name netlify_auth_token --data "$(pass-field web/netlify.com Drone-Key)" "$1"
}
function nixpkgs-review() (
export GITHUB_TOKEN="$(pass web/github.com/pat/nixpkgs-review)"
command nixpkgs-review $@
)