From 9b57787673666f38e5b597b5e2338e9d3eecd737 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Tue, 28 May 2024 21:05:50 -0600 Subject: [PATCH] gpg xdg --- shell/bashrc | 10 +++++----- shell/env | 1 + systemd/user/gpg-agent-extra.socket | 14 ++++++++++++++ systemd/user/gpg-agent.service | 9 +++++++++ vim/vimrc | 1 - 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 systemd/user/gpg-agent-extra.socket create mode 100644 systemd/user/gpg-agent.service diff --git a/shell/bashrc b/shell/bashrc index 04a510d..c27bb49 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -16,11 +16,11 @@ PATH="$HOME/.local/bin${PATH:+:${PATH}}" #PATH="/usr/local/plan9/bin${PATH:+:${PATH}}" if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi fi bind "set completion-ignore-case on" diff --git a/shell/env b/shell/env index 64c7bc1..e0be008 100644 --- a/shell/env +++ b/shell/env @@ -19,6 +19,7 @@ export \ CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" \ WINEPREFIX="$HOME/.local/share/wine" \ WGETRC="$HOME/.config/wget/wgetrc" \ + GNUPGHOME="$XDG_DATA_HOME/gnupg" \ GOPATH="$XDG_DATA_HOME/go" \ export \ diff --git a/systemd/user/gpg-agent-extra.socket b/systemd/user/gpg-agent-extra.socket new file mode 100644 index 0000000..0745301 --- /dev/null +++ b/systemd/user/gpg-agent-extra.socket @@ -0,0 +1,14 @@ +[Unit] +Description=GnuPG cryptographic agent and passphrase cache (restricted) +Documentation=man:gpg-agent(1) + +[Socket] +ListenStream=$(gpgconf --list-dirs socketdir) +FileDescriptorName=extra +Service=gpg-agent.service +SocketMode=0600 +DirectoryMode=0700 + +[Install] +WantedBy=sockets.target + diff --git a/systemd/user/gpg-agent.service b/systemd/user/gpg-agent.service new file mode 100644 index 0000000..a5379ae --- /dev/null +++ b/systemd/user/gpg-agent.service @@ -0,0 +1,9 @@ +[Unit] +Description=GnuPG cryptographic agent and passphrase cache +Documentation=man:gpg-agent(1) +Requires=gpg-agent.socket + +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg" +ExecStart=/usr/bin/gpg-agent --supervised +ExecReload=/usr/bin/gpgconf --reload gpg-agent diff --git a/vim/vimrc b/vim/vimrc index bd2ed05..f517bb0 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -33,7 +33,6 @@ set showcmd set number syntax on - if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal') if (has("nvim")) let $NVIM_TUI_ENABLE_TRUE_COLOR=1