gpg-agent: fix broken variable reference
This commit is contained in:
parent
1ab3cec3a1
commit
587719494e
|
@ -248,7 +248,7 @@ in {
|
||||||
++ optional (cfg.maxCacheTtlSsh != null)
|
++ optional (cfg.maxCacheTtlSsh != null)
|
||||||
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
||||||
++ optional (cfg.pinentryPackage != null)
|
++ optional (cfg.pinentryPackage != null)
|
||||||
"pinentry-program ${lib.getExe pinentryPackage}"
|
"pinentry-program ${lib.getExe cfg.pinentryPackage}"
|
||||||
++ [ cfg.extraConfig ]);
|
++ [ cfg.extraConfig ]);
|
||||||
|
|
||||||
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
||||||
|
|
|
@ -5,11 +5,14 @@ with lib;
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
services.gpg-agent.enable = true;
|
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;
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
test.stubs.gnupg = { };
|
test.stubs = {
|
||||||
test.stubs.systemd = { }; # depends on gnupg.override
|
gnupg = { };
|
||||||
|
systemd = { }; # depends on gnupg.override
|
||||||
|
pinentry-gnome3 = { };
|
||||||
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
|
||||||
|
@ -18,6 +21,9 @@ with lib;
|
||||||
echo $in
|
echo $in
|
||||||
fail "gpg-agent socket directory not set to default value"
|
fail "gpg-agent socket directory not set to default value"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
configFile=home-files/.gnupg/gpg-agent.conf
|
||||||
|
assertFileRegex $configFile "pinentry-program @pinentry-gnome3@/bin/dummy"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue