diff options
author | Profpatsch <mail@profpatsch.de> | 2016-07-15 14:01:30 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2016-07-15 14:07:18 +0200 |
commit | 707572674562952e15e27f69721814103290d262 (patch) | |
tree | 1b318c63d1898bcad67df255f6005029ebd19158 /machines | |
parent | a354a5be976dab6250d206a7ba6240e3afb9c8d2 (diff) |
machines/katara: gpg-agent -> keychain
I hate you, gpg-agent. Go die in a fire.
Diffstat (limited to 'machines')
-rw-r--r-- | machines/profpatsch/katara.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/machines/profpatsch/katara.nix b/machines/profpatsch/katara.nix index 668b9cb0..80a9dec0 100644 --- a/machines/profpatsch/katara.nix +++ b/machines/profpatsch/katara.nix @@ -241,10 +241,6 @@ in { export PATH+=":$HOME/.bin" #add (temporary) executables export EDITOR=emacsclient - ${gnupg}/bin/gpg-connect-agent /bye - unset SSH_AGENT_PID - export SSH_AUTH_SOCK="''${HOME}/.gnupg/S.gpg-agent.ssh" - ${xorg.xset}/bin/xset r rate 250 35 set-background & @@ -292,8 +288,14 @@ in { # Programs # gpg-agent; TODO: move to module - programs.fish.shellInit = '' - set -x GPG_TTY (tty) + programs.fish.interactiveShellInit = '' + set -l ssh_keys (find ${config.users.users.philip.home}/.ssh/ -name "*rsa*" | grep -v ".pub") + for l in (${lib.getBin pkgs.keychain}/bin/keychain \ + --eval --agents ssh $ssh_keys 2>/dev/null | \ + sed 's/^\(.*\)=\(.*\); export.*$/set \1 \2/') + eval $l + end; \ + and test -S $SSH_AUTH_SOCK; or echo "ssh agent (keychain) init failed!" ''; # TODO: base config? |