mirror of
https://github.com/nix-community/home-manager
synced 2024-12-05 01:19:46 +01:00
00efa2d4c2
systemd now depends on `gnupg.override`, so we need a stub for systemd too.
(cherry picked from commit 7ff468105d
)
26 lines
612 B
Nix
26 lines
612 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
services.gpg-agent.enable = true;
|
|
services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package.
|
|
programs.gpg = {
|
|
enable = true;
|
|
homedir = "/path/to/hash";
|
|
};
|
|
|
|
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/d.wp4h7ks5zxy4dodqadgpbbpz/S.gpg-agent" ]]
|
|
then
|
|
echo $in
|
|
fail "gpg-agent socket directory is malformed"
|
|
fi
|
|
'';
|
|
};
|
|
}
|