This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
inherit (pkgs) lib; | |
src = pkgs.fetchgit { | |
url = "https://gitlab.com/NickCao/RAIT"; | |
rev = "e84e803641ec3a2dce5670275ea8d5497608f483"; | |
fetchSubmodules = false; | |
deepClone = false; | |
leaveDotGit = false; | |
sha256 = "sha256-vaRPmHrom4GEOuAdILzFpttc4vwcRVQWhLNalCco2qE="; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do_gpg_setup() { | |
local ssh_add_err | |
if gpg-connect-agent /bye &>/dev/null && [[ -e "$HOME/.ssh_auth_sock" ]] && { ssh_add_err=$(SSH_AUTH_SOCK=$HOME/.ssh_auth_sock ssh-add -l 2>&1) || [[ $ssh_add_err = "The agent has no identities." ]]; }; then | |
export SSH_AUTH_SOCK=$HOME/.ssh_auth_sock | |
return # Nothing to do | |
else | |
[[ $orig_GPG_AGENT_INFO ]] && GPG_AGENT_INFO=$orig_GPG_AGENT_INFO gpg-connect-agent killagent /bye | |
[[ $GPG_AGENT_INFO ]] && GPG_AGENT_INFO=$GPG_AGENT_INFO gpg-connect-agent killagent /bye | |
fi |