guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 5c01b37207a5af060ddf5c04bec89babfc14b67f
Author: Rodion Goritskov <[email protected]>
AuthorDate: Sun Aug 30 15:22:28 2026 +0200

    home: services: gnupg: Expand HOME in runtime.
    
    Previously getenv was used, leading to reconfigure user's home being
    used for GNUPGHOME variable, so we end up with root's home directory
    when running guix home as part of system reconfiguration.
    
    * gnu/home/services/gnupg.scm (home-gpg-agent-envrionment-variables):
      Use environment variable expansion instead of getenv.
    
    Merges: https://codeberg.org/guix/guix/pulls/10916
    Reviewed-by: Ada Stevenson <[email protected]>
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 gnu/home/services/gnupg.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/home/services/gnupg.scm b/gnu/home/services/gnupg.scm
index 38fa58e2fa..65adf9fe51 100644
--- a/gnu/home/services/gnupg.scm
+++ b/gnu/home/services/gnupg.scm
@@ -157,12 +157,11 @@ agent, with support for handling OpenSSH material."))))
 
 (define (home-gpg-agent-environment-variables config)
   "Return GnuPG environment variables needed for @var{config}."
-  (let ((home (getenv "HOME"))
-        (gnupghome (home-gpg-agent-configuration-home config)))
+  (let ((gnupghome (home-gpg-agent-configuration-home config)))
    `(,@(if (home-gpg-agent-configuration-ssh-support? config)
            '(("SSH_AUTH_SOCK" . "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"))
            '())
-     ("GNUPGHOME" . ,(in-vicinity home gnupghome)))))
+     ("GNUPGHOME" . ,(in-vicinity "$HOME" gnupghome)))))
 
 (define (gpg-agent-activation config)
   (with-imported-modules (source-module-closure

Reply via email to