From a79f6dd33554bebfe87777c98beec6e692537c38 Mon Sep 17 00:00:00 2001 From: Adrien 'neox' Bourmault Date: Tue, 3 Oct 2023 19:53:09 +0200 Subject: [PATCH] Support de SSH par gnupg --- .bashrc | 4 ++++ home-configuration.scm | 45 +++++++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/.bashrc b/.bashrc index b41b10f..2558cd5 100755 --- a/.bashrc +++ b/.bashrc @@ -36,3 +36,7 @@ export GUIX_PACKAGE_PATH=~/.config/guix/packages/defs source ~/.bash_secrets +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi diff --git a/home-configuration.scm b/home-configuration.scm index dd28b0b..61d5c94 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -7,27 +7,32 @@ (use-modules (gnu home) (gnu services) (gnu packages) + (gnu packages gnupg) (guix gexp) - (gnu home services shells)) + (gnu home services shells) + (gnu home services gnupg)) (home-environment (services - (list (service home-bash-service-type - (home-bash-configuration - (aliases '( - ("clear" . "printf '\\033c'") - ("dir" . "dir --color=auto") - ("egrep" . "egrep --color=auto") - ("fgrep" . "fgrep --color=auto") - ("grep" . "grep --color=auto") - ("la" . "ls -A") - ("ll" . "ls -l") - ("l" . "ls -CF") - ("ls" . "ls -p --color=auto") - ("vdir" . "vdir --color=auto") - )) - (bashrc (list (local-file - "/home/neox/.config/guix//.bashrc" "bashrc"))) - (bash-profile (list (local-file - "/home/neox/.config/guix//.bash_profile" - "bash_profile")))))))) + (list (service home-bash-service-type + (home-bash-configuration + (aliases '( + ("clear" . "printf '\\033c'") + ("dir" . "dir --color=auto") + ("egrep" . "egrep --color=auto") + ("fgrep" . "fgrep --color=auto") + ("grep" . "grep --color=auto") + ("la" . "ls -A") + ("ll" . "ls -l") + ("l" . "ls -CF") + ("ls" . "ls -p --color=auto") + ("vdir" . "vdir --color=auto"))) + (bashrc (list (local-file "/home/neox/.config/guix//.bashrc" "bashrc"))) + (bash-profile (list (local-file + "/home/neox/.config/guix//.bash_profile" + "bash_profile"))))) + (service home-gpg-agent-service-type + (home-gpg-agent-configuration + (pinentry-program + (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) + (ssh-support? #t))))))