helm/modules/shell/gnupg.nix

28 lines
576 B
Nix
Raw Normal View History

2019-08-06 10:56:54 -07:00
{ config, lib, pkgs, ... }:
{
2020-01-12 15:17:17 -08:00
my = {
packages = with pkgs; [
gnupg
pinentry
];
2020-01-12 15:17:17 -08:00
env.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
init = "mkdir -p \"$GNUPGHOME\" -m 700";
};
2019-08-06 10:56:54 -07:00
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
systemd.user.services.gpg-agent.serviceConfig.ExecStart = [
"" ''
${pkgs.gnupg}/bin/gpg-agent \
--supervised \
--allow-emacs-pinentry \
2020-01-12 15:17:17 -08:00
--default-cache-ttl 1800 \
--pinentry-program ${pkgs.pinentry}/bin/pinentry-gtk-2
''
];
2019-08-06 10:56:54 -07:00
}