From d05c7bed71c9f65b5c0b4051b240203c183f50ac Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 16 Dec 2019 01:53:23 -0700 Subject: [PATCH] users#nrd: fix gpg-agent --- users/nrd.nix | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/users/nrd.nix b/users/nrd.nix index 311b92e..d9de3fd 100644 --- a/users/nrd.nix +++ b/users/nrd.nix @@ -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 = {