From 06b78fbadf5f990435c33210d3db80a982cc180c Mon Sep 17 00:00:00 2001 From: Hans Muendelein Date: Sat, 2 Nov 2024 13:56:09 +0100 Subject: [PATCH] Update with AI input for pinentry config --- shell.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/shell.nix b/shell.nix index 0df0ace..0219c6a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,16 +1,24 @@ { pkgs ? import { } }: pkgs.mkShell { - shellHook = '' - echo pinentry-program > $HOME/.gnupg/gpg-agent.conf $(which pinentry-curses) - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) - gpg-connect-agent reloadagent /bye - git clone ssh://git@git.cluster.gay:2222/hans/nix.git - ''; buildInputs = with pkgs; [ gnupg git vim pinentry-curses ]; + + shellHook = '' + # Set the pinentry program in gpg-agent.conf + echo "pinentry-program = ${pkgs.pinentry-curses}/bin/pinentry-curses" > $HOME/.gnupg/gpg-agent.conf + + # Set the SSH agent socket for gpg-agent + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + + # Reload the gpg-agent to apply changes + gpg-connect-agent reloadagent /bye + + # Clone the repository + git clone ssh://git@git.cluster.gay:2222/hans/nix.git + ''; }