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"; name = "Timothy DeHerrera";
gpgEnableSsh = true;
in in
{ {
imports = [ imports = [
../profiles/develop ../profiles/develop
]; ];
environment.shellInit = '' programs.gnupg.agent = {
# gpg enable = true;
export GPG_TTY="$(tty)" enableSSHSupport = true;
'' + 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)";
}; };
environment.systemPackages = with pkgs; [
pinentry_gnome
];
home-manager.users.nrd = { home-manager.users.nrd = {
home = { home = {
packages = mkForce []; 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 = { users.users.nrd = {