summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Roelli <charles@aurox.ch>2026-02-24 14:00:01 +0100
committerCharles Roelli <charles@aurox.ch>2026-02-24 14:00:01 +0100
commit9c4770af1ad15684ff58cf5941a849d949303fb0 (patch)
tree548f1080c58e50f6d507cbb16a5eec490721f859
parent9039d717dcafcee27e0ae47a90ff9993715354a3 (diff)
Set up SSH_AUTH_SOCK with gpg-agent
Some problems with the previous approach: * .bashrc only applies to bash, not e.g. Emacs * TTY configuration is not used * Ubuntu overrides SSH_AUTH_SOCK due to package gnome-keyring To make this work reliably, get rid of Ubuntu package gnome-keyring, and for good measure, libpam-gnome-keyring.
-rw-r--r--.bashrc5
-rw-r--r--.profile1
-rw-r--r--home-configuration.scm3
3 files changed, 4 insertions, 5 deletions
diff --git a/.bashrc b/.bashrc
index e739521..5ab135a 100644
--- a/.bashrc
+++ b/.bashrc
@@ -116,9 +116,4 @@ if ! shopt -oq posix; then
fi
fi
-export GPG_TTY=$(tty)
-export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-gpgconf --launch gpg-agent
-gpg-connect-agent updatestartuptty /bye > /dev/null
-
shopt -s checkjobs
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..11dd1da
--- /dev/null
+++ b/.profile
@@ -0,0 +1 @@
+export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
diff --git a/home-configuration.scm b/home-configuration.scm
index 5e05df8..f88fe76 100644
--- a/home-configuration.scm
+++ b/home-configuration.scm
@@ -23,6 +23,9 @@
(list (simple-service 'home-environment-variables-service
home-environment-variables-service-type
'(("EDITOR" . "emacsclient")))
+ (simple-service 'additional-profile-config
+ home-shell-profile-service-type
+ (list (local-file ".profile" "profile")))
(service home-bash-service-type
(home-bash-configuration
(aliases '(("egrep" . "egrep --color=auto")