GPG version warning when using gpg-agent from nixos but gnupg from user

Oh sorry, yeah it’s only in master/nixos-unstable as of now (programs.gnupg: Support setting the gnupg program by bkchr · Pull Request #57782 · NixOS/nixpkgs · GitHub).

What you could do instead is add disabledModules and imports to replace the gnupg module with the one on master/nixos-unstable:

{
  disabledModules = [ "programs/gnupg.nix" ];
  imports = [
    (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/d26027792812fbfad4d0f451b5f47fdabf7fdeb9"
      + "/nixos/modules/programs/gnupg.nix")
  ];

  programs.gnupg = {
    # ...
  };
}

untested, but something like this should work. You can also add a sha256 to the fetchTarball to have it not be downloaded (almost) every time

2 Likes