summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gnupg/gpg-agent.conf.template (renamed from .gnupg/gpg-agent.conf)2
-rw-r--r--README.md11
3 files changed, 9 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 55acb54..6f28434 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
+.gnupg/gpg-agent.conf
Brewfile.lock.json
diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf.template
index 6d38770..4d52149 100644
--- a/.gnupg/gpg-agent.conf
+++ b/.gnupg/gpg-agent.conf.template
@@ -1,4 +1,4 @@
-pinentry-program /usr/local/bin/pinentry-wrapper
+pinentry-program ${HOME}/.local/bin/pinentry-wrapper
default-cache-ttl 3600
default-cache-ttl-ssh 3600
diff --git a/README.md b/README.md
index feb95d3..fcc161a 100644
--- a/README.md
+++ b/README.md
@@ -10,15 +10,18 @@
### Essentials
```bash
-git clone https://git.sr.ht/~a14m/.rc
-sudo ln -sf ~/.rc/.gnupg/pinentry-wrapper /usr/local/bin/pinentry-wrapper
+git clone https://git.sr.ht/~a14m/.rc ~/.rc
+
cd ~/.rc
stow --no-folding --adopt .
git restore .
git remote set-url origin [email protected]:~a14m/.rc
+
+ln -sf ~/.rc/.gnupg/pinentry-wrapper ~/.local/bin/pinentry-wrapper
+envsubst < ~/.gnupg/gpg-agent.conf.template > ~/.gnupg/gpg-agent.conf
chmod 0700 ~/.gnupg
-gpgconf --kill gpg-agent
-gpg-connect-agent /bye
+gpgconf --kill gpg-agent 2>/dev/null || true
+gpg-connect-agent /bye 2>/dev/null || true
```
Extra configurations for different distro families: