1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-21 22:07:30 +02:00
home-manager/tests/modules/services/gpg-agent/default-homedir.nix
Bruno BELANYI 68921b0e80
gpg-agent: migrate to 'pinentryPackage'
This follows upstream's module change [1], which allows setting any
package as a pinentry program.

[1]: https://github.com/NixOS/nixpkgs/pull/133542
2024-04-10 21:27:41 +02:00

23 lines
548 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
services.gpg-agent.enable = true;
services.gpg-agent.pinentryPackage = null; # Don't build pinentry package.
programs.gpg.enable = true;
test.stubs.gnupg = { };
test.stubs.systemd = { }; # depends on gnupg.override
nmt.script = ''
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
if [[ $in != "%t/gnupg/S.gpg-agent" ]]
then
echo $in
fail "gpg-agent socket directory not set to default value"
fi
'';
};
}