diff --git a/nixos/base.nix b/nixos/base.nix index a0d04d8a..f0363cc1 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -21,7 +21,13 @@ systemd.services.systemd-user-sessions.enable = false; # Security - programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + programs.gnupg = { + agent = { + enable = true; + enableSSHSupport = true; + }; + package = pkgs.gnupg_2_4_0; + }; services.pcscd.enable = true; # Networking diff --git a/nixos/home-manager.nix b/nixos/home-manager.nix index e042082e..27aa7281 100644 --- a/nixos/home-manager.nix +++ b/nixos/home-manager.nix @@ -17,12 +17,14 @@ inputs: { pkgs, config, ... }: { enable = true; }; + programs.gpg.package = pkgs.gnupg_2_4_0; + services.gpg-agent = { enable = true; defaultCacheTtl = 8 * 60 * 60; maxCacheTtl = 8 * 60 * 60; enableSshSupport = true; - pinentryFlavor = "qt"; + pinentryFlavor = "gnome3"; }; services.blueman-applet = { diff --git a/nixos/overlay.nix b/nixos/overlay.nix index e9d0cbb3..bd521108 100644 --- a/nixos/overlay.nix +++ b/nixos/overlay.nix @@ -23,4 +23,14 @@ final: prev: { hash = "sha256-v0rr1s32jj79A8IGfJgSGJVlz7rSnZYn4ealOpqee0w="; }; }); + + gnupg_2_4_0 = prev.gnupg.overrideAttrs(_: rec { + pname = "gnupg"; + # 2.4.1 breaks emacs + version = "2.4.0"; + src = prev.fetchurl { + url = "mirror://gnupg/gnupg/${pname}-${version}.tar.bz2"; + hash = "sha256-HXkVjdAdmSQx3S4/rLif2slxJ/iXhOosthDGAPsMFIM="; + }; + }); }