From 707572674562952e15e27f69721814103290d262 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 15 Jul 2016 14:01:30 +0200 Subject: machines/katara: gpg-agent -> keychain I hate you, gpg-agent. Go die in a fire. --- machines/profpatsch/katara.nix | 14 ++++++++------ 1 file 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? -- cgit 1.4.1