add gpg and pam-gnupg

This commit is contained in:
lelgenio 2020-10-18 14:25:08 -03:00
parent 2866ce2d23
commit 7535554906
3 changed files with 21 additions and 0 deletions

View File

@ -196,6 +196,11 @@ dotfiles: # {{{
clang-format:
src: clang-format
dst: ~/.clang-format
gpg-agent:
src: gpg-agent.conf
dst: ~/.gnupg/gpg-agent.conf
actions:
- pam_gpg
# }}}
actions: #{{{
notify: notify-send "Updating dotfiles" "{{@@ _dotfile_abs_dst.lstrip(env['HOME']) @@}}"
@ -230,5 +235,7 @@ actions: #{{{
git clone
https://github.com/alexanderjeurissen/ranger_devicons
~/.config/ranger/plugins/ranger_devicons
pam_gpg: |
_pam-gpg-strap
# }}}
# vim: fdm=marker

2
dotfiles/gpg-agent.conf Normal file
View File

@ -0,0 +1,2 @@
allow-preset-passphrase
max-cache-ttl 604800

12
dotfiles/scripts/_pam-gpg-strap Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
gpg --list-secret-keys --with-keygrip \
"{{@@ username @@}}@{{@@ mail @@}}" |
awk '
/^ssb/ {
ssb=1
}
/Keygrip/{
if (ssb) print $3
}' > .pam-gnupg