mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
gpg-agent: use the canonical path for sockets on macOS
GnuPG on macOS uses the canonical path for sockets
This commit is contained in:
parent
fe9ef570fe
commit
cbaeb4e1e1
2 changed files with 7 additions and 4 deletions
|
@ -43,7 +43,9 @@ let
|
|||
else
|
||||
"d.${hash}/${dir}";
|
||||
in if pkgs.stdenv.isDarwin then
|
||||
"/private/var/run/org.nix-community.home.gpg-agent/${subdir}"
|
||||
# macOS GnuPG sockets always use the canonical path.
|
||||
# See #3864
|
||||
"${homedir}/${subdir}"
|
||||
else
|
||||
"%t/gnupg/${subdir}";
|
||||
|
||||
|
@ -355,8 +357,9 @@ in {
|
|||
launchd.agents.gpg-agent = {
|
||||
enable = true;
|
||||
config = {
|
||||
ProgramArguments = [ "${gpgPkg}/bin/gpg-agent" "--supervised" ]
|
||||
++ optional cfg.verbose "--verbose";
|
||||
# macOS doesn't like the "--supervised" option
|
||||
ProgramArguments = [ "${gpgPkg}/bin/gpgconf" "--launch" "gpg-agent" ]
|
||||
++ optionals cfg.verbose [ "--verbose" ];
|
||||
EnvironmentVariables = { GNUPGHOME = homedir; };
|
||||
KeepAlive = {
|
||||
Crashed = true;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<key>SockPathMode</key>
|
||||
<integer>384</integer>
|
||||
<key>SockPathName</key>
|
||||
<string>/private/var/run/org.nix-community.home.gpg-agent/d.wp4h7ks5zxy4dodqadgpbbpz/S.gpg-agent</string>
|
||||
<string>/path/to/hash/d.wp4h7ks5zxy4dodqadgpbbpz/S.gpg-agent</string>
|
||||
<key>SockType</key>
|
||||
<string>stream</string>
|
||||
</dict>
|
||||
|
|
Loading…
Reference in a new issue