usar yubikey-agent y correr runit en gnome

This commit is contained in:
Cat /dev/Nulo 2023-03-21 20:52:34 -03:00
parent 781a30673a
commit daa02a7850
4 changed files with 16 additions and 2 deletions

View file

@ -1,8 +1,12 @@
if ! "$REMOTE" if ! "$REMOTE"
set --erase SSH_AGENT_PID set --erase SSH_AGENT_PID
# if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then # if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/yubikey-agent.sock"
if ! pgrep yubikey-agent >/dev/null
nohup yubikey-agent -l "$SSH_AUTH_SOCK" 2>/dev/null &
end
# Start if not started # Start if not started
gpg-agent --daemon 2>/dev/null # gpg-agent --daemon 2>/dev/null
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" # export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
# fi # fi
end end

3
.config/sv/yubikey-agent/run Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/yubikey-agent.sock"
exec yubikey-agent -l "$SSH_AUTH_SOCK"

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Name=Start Runit
Comment=Inicia runit y corre servicios
Exec=runsvdir /home/diablo/.local/share/service .............
Terminal=false
Type=Application

View file

@ -0,0 +1 @@
/home/diablo/.config/sv/yubikey-agent