1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

gpg-agent: use gpgconf to launch gpg-agent on macOS

The '--supervised' option is deprecated and not supported. Instead, use
gpgconf to launch gpg-agent which will use '--daemon' along with
'--use-standard-socket' to use the canonical socket paths under $GNUPGHOME.

Co-authored-by: Calum MacRae <hi@cmacr.ae>
This commit is contained in:
Ayman Bagabas 2024-09-27 14:44:48 +02:00
parent cbaeb4e1e1
commit c255e93957
No known key found for this signature in database
GPG key ID: C8D51D2157C919AC
2 changed files with 5 additions and 3 deletions

View file

@ -358,7 +358,8 @@ in {
enable = true; enable = true;
config = { config = {
# macOS doesn't like the "--supervised" option # macOS doesn't like the "--supervised" option
ProgramArguments = [ "${gpgPkg}/bin/gpgconf" "--launch" "gpg-agent" ] ProgramArguments =
[ "${gpgPkg}/bin/gpgconf" "--launch" "gpg-agent" ]
++ optionals cfg.verbose [ "--verbose" ]; ++ optionals cfg.verbose [ "--verbose" ];
EnvironmentVariables = { GNUPGHOME = homedir; }; EnvironmentVariables = { GNUPGHOME = homedir; };
KeepAlive = { KeepAlive = {

View file

@ -20,8 +20,9 @@
<string>Background</string> <string>Background</string>
<key>ProgramArguments</key> <key>ProgramArguments</key>
<array> <array>
<string>@gpg@/bin/gpg-agent</string> <string>@gpg@/bin/gpgconf</string>
<string>--supervised</string> <string>--launch</string>
<string>gpg-agent</string>
</array> </array>
<key>RunAtLoad</key> <key>RunAtLoad</key>
<false/> <false/>