mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
gpg-agent: fix broken variable reference
This commit is contained in:
parent
1ab3cec3a1
commit
587719494e
2 changed files with 10 additions and 4 deletions
|
@ -248,7 +248,7 @@ in {
|
|||
++ optional (cfg.maxCacheTtlSsh != null)
|
||||
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
||||
++ optional (cfg.pinentryPackage != null)
|
||||
"pinentry-program ${lib.getExe pinentryPackage}"
|
||||
"pinentry-program ${lib.getExe cfg.pinentryPackage}"
|
||||
++ [ cfg.extraConfig ]);
|
||||
|
||||
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
||||
|
|
|
@ -5,11 +5,14 @@ with lib;
|
|||
{
|
||||
config = {
|
||||
services.gpg-agent.enable = true;
|
||||
services.gpg-agent.pinentryPackage = null; # Don't build pinentry package.
|
||||
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
programs.gpg.enable = true;
|
||||
|
||||
test.stubs.gnupg = { };
|
||||
test.stubs.systemd = { }; # depends on gnupg.override
|
||||
test.stubs = {
|
||||
gnupg = { };
|
||||
systemd = { }; # depends on gnupg.override
|
||||
pinentry-gnome3 = { };
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||
|
@ -18,6 +21,9 @@ with lib;
|
|||
echo $in
|
||||
fail "gpg-agent socket directory not set to default value"
|
||||
fi
|
||||
|
||||
configFile=home-files/.gnupg/gpg-agent.conf
|
||||
assertFileRegex $configFile "pinentry-program @pinentry-gnome3@/bin/dummy"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue