From bee634eb796424985b239b01988257d400ed8036 Mon Sep 17 00:00:00 2001 From: anmiller Date: Thu, 22 Aug 2024 14:23:18 +0000 Subject: [PATCH] Attempt to fix pinentry on non-nixos --- apply-dotfiles | 4 ++++ gnupg/.gnupg/gpg-agent.conf | 1 + installers/install-nix-packages-flake.sh | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 gnupg/.gnupg/gpg-agent.conf diff --git a/apply-dotfiles b/apply-dotfiles index f86623c..c633af1 100755 --- a/apply-dotfiles +++ b/apply-dotfiles @@ -22,6 +22,10 @@ apply_dotfile vim apply_dotfile ruby apply_dotfile python +# Only if inside a coder instance +if [ -n "${CODER}" ]; then + apply_dotfile gnupg +fi # Check that SSH version is above 9.2 (where EnableEscapeCommandline was added) before conditionally adding # a config file. This is then included in the main config diff --git a/gnupg/.gnupg/gpg-agent.conf b/gnupg/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..4ff0204 --- /dev/null +++ b/gnupg/.gnupg/gpg-agent.conf @@ -0,0 +1 @@ +pinentry-program /home/coder/.nix-profile/bin/pinentry-curses diff --git a/installers/install-nix-packages-flake.sh b/installers/install-nix-packages-flake.sh index b40149b..2c3de43 100755 --- a/installers/install-nix-packages-flake.sh +++ b/installers/install-nix-packages-flake.sh @@ -27,6 +27,8 @@ nix_packages=( "pass" "gnupg" + "gnupg1" + "pinentry-curses" # Professional tools "skopeo"