users#nrd: fix gpg-agent

This commit is contained in:
Timothy DeHerrera 2019-12-16 01:53:23 -07:00
parent 42f2f27183
commit d05c7bed71
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122

View file

@ -12,24 +12,21 @@ let
name = "Timothy DeHerrera";
gpgEnableSsh = true;
in
{
imports = [
../profiles/develop
];
environment.shellInit = ''
# gpg
export GPG_TTY="$(tty)"
'' + lib.optionalString gpgEnableSsh
"${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null";
environment.sessionVariables = {
SSH_AUTH_SOCK = "$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)";
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
environment.systemPackages = with pkgs; [
pinentry_gnome
];
home-manager.users.nrd = {
home = {
packages = mkForce [];
@ -119,18 +116,6 @@ in
};
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
maxCacheTtl = 1800;
defaultCacheTtlSsh = 60480000;
maxCacheTtlSsh = 60480000;
enableSshSupport = gpgEnableSsh;
extraConfig = ''
pinentry-program ${pkgs.pinentry.tty}/bin/pinentry-tty
'';
};
};
users.users.nrd = {