From 1d933f1a458c510be9329edaab2b1381e098ac48 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 23 Aug 2026 18:31:35 +0200 Subject: modules/fish: Init --- modules/by-name/gp/gpg/module.nix | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'modules/by-name/gp/gpg/module.nix') diff --git a/modules/by-name/gp/gpg/module.nix b/modules/by-name/gp/gpg/module.nix index 769bcab6..28615adc 100644 --- a/modules/by-name/gp/gpg/module.nix +++ b/modules/by-name/gp/gpg/module.nix @@ -26,20 +26,31 @@ in { programs = { qutebrowser.key = "8321 ED3A 8DB9 99A5 1F3B F80F F268 2914 EA42 DE26"; - zsh.integrations.gpg = '' - export GPG_TTY=$(tty) + fish.integrations.gpg = + # fish + '' + set --export --global GPG_TTY $(tty) - # Magic copied from the gpg-agent manual - unset SSH_AGENT_PID - if [ "''${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - fi + # Ensure that get gpg agent is started (necessary because ssh does not start it + # automatically and has it's tty updated) + gpg-connect-agent updatestartuptty /bye + ''; + zsh.integrations.gpg = + # bash + '' + export GPG_TTY=$(tty) + # Magic copied from the gpg-agent manual + unset SSH_AGENT_PID + if [ "''${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + fi - # Ensure that get gpg agent is started (necessary because ssh does not start it - # automatically and has it's tty updated) - gpg-connect-agent /bye - ''; + + # Ensure that get gpg agent is started (necessary because ssh does not start it + # automatically and has it's tty updated) + gpg-connect-agent /bye + ''; }; services.unison.pathsToIgnore = [ -- cgit v1.3.1