helm/modules/shell/gnupg.nix

31 lines
611 B
Nix
Raw Normal View History

2019-08-06 10:56:54 -07:00
{ config, lib, pkgs, ... }:
{
environment = {
extraInit = ''
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
2019-12-04 21:32:29 -08:00
mkdir -p "$GNUPGHOME" -m 700
'';
systemPackages = with pkgs; [
gnupg
pinentry
];
};
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 \
--default-cache-ttl 1200 \
--pinentry-program ${pkgs.pinentry}/bin/pinentry-gtk-2
''
];
2019-08-06 10:56:54 -07:00
}