diff options
| author | Hilton Chain <hako@ultrarare.space> | 2026-04-09 16:23:59 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2026-04-17 03:07:05 +0800 |
| commit | ace8be46a4cc1e4784385357d2c71058e7a65448 (patch) | |
| tree | c3a61b99b7678aeaf689155ff2d98547e8b82f46 /gnu/home | |
| parent | f0079d20ae3b85e16fef9af4b48e9d0c954b10fe (diff) | |
home: services: gpg-agent: Expose shepherd-requirement in configuration.
* gnu/home/services/gnupg.scm (home-gpg-agent-configuration)
[shepherd-requirement]: New field.
(home-gpg-agent-shepherd-services): Use it.
* doc/guix.texi (GNU Privacy Guard): Update documentation.
Merges: #7788
Diffstat (limited to 'gnu/home')
| -rw-r--r-- | gnu/home/services/gnupg.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/home/services/gnupg.scm b/gnu/home/services/gnupg.scm index aa9fb4ca6a0..67a7e267c60 100644 --- a/gnu/home/services/gnupg.scm +++ b/gnu/home/services/gnupg.scm | |||
| @@ -81,7 +81,10 @@ entry will be expired even if it has been accessed recently.") | |||
| 81 | "Maximum time a cache entry for SSH keys is valid, in seconds.") | 81 | "Maximum time a cache entry for SSH keys is valid, in seconds.") |
| 82 | (extra-content | 82 | (extra-content |
| 83 | (raw-configuration-string "") | 83 | (raw-configuration-string "") |
| 84 | "Raw content to add to the end of @file{~/.gnupg/gpg-agent.conf}.")) | 84 | "Raw content to add to the end of @file{~/.gnupg/gpg-agent.conf}.") |
| 85 | (shepherd-requirement | ||
| 86 | (list-of-symbols '()) | ||
| 87 | "List of services that should be started before this service.")) | ||
| 85 | 88 | ||
| 86 | (define (home-gpg-agent-configuration-file config) | 89 | (define (home-gpg-agent-configuration-file config) |
| 87 | "Return the @file{gpg-agent.conf} file for @var{config}." | 90 | "Return the @file{gpg-agent.conf} file for @var{config}." |
| @@ -104,7 +107,7 @@ entry will be expired even if it has been accessed recently.") | |||
| 104 | (define (home-gpg-agent-shepherd-services config) | 107 | (define (home-gpg-agent-shepherd-services config) |
| 105 | "Return the possibly-empty list of Shepherd services for @var{config}." | 108 | "Return the possibly-empty list of Shepherd services for @var{config}." |
| 106 | (match-record config <home-gpg-agent-configuration> | 109 | (match-record config <home-gpg-agent-configuration> |
| 107 | (gnupg ssh-support?) | 110 | (gnupg ssh-support? shepherd-requirement) |
| 108 | ;; 'gpg-agent' is started on demand by GnuPG's programs, but it has to be | 111 | ;; 'gpg-agent' is started on demand by GnuPG's programs, but it has to be |
| 109 | ;; started explicitly when OpenSSH support is enabled (info "(gnupg) Agent | 112 | ;; started explicitly when OpenSSH support is enabled (info "(gnupg) Agent |
| 110 | ;; Options"). | 113 | ;; Options"). |
| @@ -119,6 +122,7 @@ entry will be expired even if it has been accessed recently.") | |||
| 119 | #:socket-directory-permissions #o700)))) | 122 | #:socket-directory-permissions #o700)))) |
| 120 | (list (shepherd-service | 123 | (list (shepherd-service |
| 121 | (provision '(gpg-agent ssh-agent)) | 124 | (provision '(gpg-agent ssh-agent)) |
| 125 | (requirement shepherd-requirement) | ||
| 122 | (modules '((shepherd support))) ;for '%user-runtime-dir' | 126 | (modules '((shepherd support))) ;for '%user-runtime-dir' |
| 123 | (start | 127 | (start |
| 124 | #~(lambda args | 128 | #~(lambda args |
