From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WAcOGmb+fmaonQAAe85BDQ:P1 (envelope-from ) for ; Fri, 28 Jun 2024 18:18:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WAcOGmb+fmaonQAAe85BDQ (envelope-from ) for ; Fri, 28 Jun 2024 20:18:14 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=QeKIHABN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719598694; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=n6xJ4UEHvtIOKxqS8zYLiOCKp9S8onpaMCwiLNTe+Lo=; b=AWZlUsU7+7E+W8kB5nSArOHFwrrgeHRYjrSPjuVkQk8Hr+Nxl+UXMi0hasOtImeOiLzU09 iEnIlhUn61Md/z5uuliwIqXtM4ZtKTKVczErVdQ5j5vuVT9qHlKPAwYOqUlzBuE4TTvwn3 OIQ0lwDfqdG6w1qPgS1meAq5pCskMxCb/C3Ywx14TaGzOc1uI9ca2HBAUR1o2Z/aoN4ZEN 3caaTFaS3SgIcidkCGS38LuP4PXBeeMmg+DDLcEVv4HfDUPNXcyjmhst/OOPMelHhDbs2H euxyFrebZF8e03FZ5aA2/fBiDFo/Viwf5qjc2XLWRJ8stdCjl0Z2wzYOt/2fsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719598694; a=rsa-sha256; cv=none; b=UKGUE8+yitdnZiZ47tKOB3vnnChCLWWYR9gTbPYQoRhBWmQHeCY11TLUAdZG+y8J2zeaQU l0Wvx98COrv0MY+/30My9osSW4CuKueGFwc1pv06LTCUYN9Hu2KAcXzBeoGyDBXI1ybVVe dLXWb5BlmQwCDtgvXYXkI4sSbU9goptvLQYHnBUB4ZJJPce0sPi8z4GqnNB+xcI7HMh4IT kIr5H04ge2wC9iY+NksI0+mGXznJLKYOUFAIrDORyF8fHhEGu8oTvRTquVGevB7KP4DREA U9d35V3PqnzRfrf7xElRDx/uIU/7WF1fvoEG3fEigdbkQsK71nWHIO150gScrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=QeKIHABN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 41C7A1D6EA for ; Fri, 28 Jun 2024 20:18:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNGAg-0003SZ-G7; Fri, 28 Jun 2024 14:18:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNGAc-0003Ru-Rp for guix-patches@gnu.org; Fri, 28 Jun 2024 14:18:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNGAc-0004xE-KD for guix-patches@gnu.org; Fri, 28 Jun 2024 14:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNGAc-0005yu-DS for guix-patches@gnu.org; Fri, 28 Jun 2024 14:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71826] [PATCH] home: Set 700 permissions on .gnupg with home-gpg-agent-service Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Fri, 28 Jun 2024 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71826 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71826@debbugs.gnu.org Cc: Richard Sent , ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.171959863222930 (code B ref -1); Fri, 28 Jun 2024 18:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2024 18:17:12 +0000 Received: from localhost ([127.0.0.1]:46337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNG9o-0005xl-0Q for submit@debbugs.gnu.org; Fri, 28 Jun 2024 14:17:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:53946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNG9l-0005xd-6Y for submit@debbugs.gnu.org; Fri, 28 Jun 2024 14:17:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNG9k-0002t0-D6 for guix-patches@gnu.org; Fri, 28 Jun 2024 14:17:08 -0400 Received: from mail-108-mta22.mxroute.com ([136.175.108.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNG9i-0004lb-DP for guix-patches@gnu.org; Fri, 28 Jun 2024 14:17:08 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta22.mxroute.com (ZoneMTA) with ESMTPSA id 1906010a45b00017a3.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 28 Jun 2024 18:17:01 +0000 X-Zone-Loop: f2ab9f612507deeaa1ce5713414722e109eee3851cf0 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=n6xJ4UEHvtIOKxqS8zYLiOCKp9S8onpaMCwiLNTe+Lo=; b=QeKIHABNFJRkTrfAf88vcGhPO4 P4m4vlxYe5L+44RnXQha2JwUyq6xgIS9jodQOy9wyRFjzaDyceo6QSmHidE+hC63G8cqz9u4QLitt lQarj8rLfVpUyS+8M7FvvWjD/m5H5LA1h7Vk2wJ4G1sNuXvu8kKGRJ+X3UBr6IiHLE8tMkFZPBrTR nMlWwM5pUnQdmyeToW2z1uw58mGg2o4ITnadKsKqZsVQdqIXr2OVgf/MCnmTJEbDnlonizKMKqv4w FlMjyJALrKGqfFDdHV5fO94hjAQfnSxBIEFU+Om8kwZWrKRTPbRMiNCckTjwnMAoDUPHftXP7I5zq 6u2S7uNA==; From: Richard Sent Date: Fri, 28 Jun 2024 14:16:31 -0400 Message-ID: <435c04edbcf2dccbe9714a88c2fa9b75255de100.1719598591.git.richard@freakingpenguin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.22; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta22.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 41C7A1D6EA X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.08 X-Spam-Score: -5.08 X-TUID: BBZ2tGfOsDrM * gnu/home/services/gnupg.scm (gpg-agent-activation): New variable. (home-gpg-agent-service-type) [extensions]: Extend home-activation-service-type. Change-Id: If3365c6cade2b03ee53a466ce1d63a5cdf654d6c --- Followed a similar structure as openssh-activation in (gnu home services ssh). gnu/home/services/gnupg.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/home/services/gnupg.scm b/gnu/home/services/gnupg.scm index 04989666ed..1bd1deae5c 100644 --- a/gnu/home/services/gnupg.scm +++ b/gnu/home/services/gnupg.scm @@ -19,6 +19,7 @@ (define-module (gnu home services gnupg) #:use-module (guix gexp) + #:use-module (guix modules) #:use-module ((guix records) #:select (match-record)) #:use-module (gnu services) #:use-module (gnu services configuration) @@ -142,6 +143,17 @@ (define (home-gpg-agent-environment-variables config) . "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh")) '())) +(define gpg-agent-activation + (with-imported-modules (source-module-closure + '((gnu build activation))) + #~(begin + (use-modules (gnu build activation)) + + ;; Make sure ~/.gnupg is #o700. + (let* ((home (getenv "HOME")) + (dot-ssh (string-append home "/.gnupg"))) + (mkdir-p/perms dot-ssh (getpw (getuid)) #o700))))) + (define home-gpg-agent-service-type (service-type (name 'home-gpg-agent) @@ -150,6 +162,8 @@ (define home-gpg-agent-service-type home-gpg-agent-files) (service-extension home-shepherd-service-type home-gpg-agent-shepherd-services) + (service-extension home-activation-service-type + (const gpg-agent-activation)) (service-extension home-environment-variables-service-type home-gpg-agent-environment-variables))) (default-value (home-gpg-agent-configuration)) base-commit: ae55410e0752000268b31c71dddea58e6106522a -- 2.45.1