mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
gpg-agent: migrate to 'pinentryPackage'
This follows upstream's module change [1], which allows setting any package as a pinentry program. [1]: https://github.com/NixOS/nixpkgs/pull/133542
This commit is contained in:
parent
2f0db7d418
commit
01e4a5143e
4 changed files with 21 additions and 8 deletions
|
@ -1443,6 +1443,15 @@ in {
|
|||
A new module is available: 'programs.joplin-desktop'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2024-03-14T07:22:09+00:00";
|
||||
condition = config.services.gpg-agent.enable;
|
||||
message = ''
|
||||
'services.gpg-agent.pinentryFlavor' has been removed and replaced by
|
||||
'services.gpg-agent.pinentryPackage'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -81,6 +81,11 @@ let
|
|||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule [ "services" "gpg-agent" "pinentryFlavor" ]
|
||||
"Use services.gpg-agent.pinentryPackage instead")
|
||||
];
|
||||
|
||||
options = {
|
||||
services.gpg-agent = {
|
||||
enable = mkEnableOption "GnuPG private key agent";
|
||||
|
@ -192,10 +197,9 @@ in {
|
|||
configuration file.
|
||||
'';
|
||||
};
|
||||
|
||||
pinentryFlavor = mkOption {
|
||||
type = types.nullOr (types.enum pkgs.pinentry.flavors);
|
||||
example = "gnome3";
|
||||
pinentryPackage = mkOption {
|
||||
type = types.nullOr types.package;
|
||||
example = literalExpression "pkgs.pinentry-gnome3";
|
||||
default = null;
|
||||
description = ''
|
||||
Which pinentry interface to use. If not
|
||||
|
@ -243,8 +247,8 @@ in {
|
|||
"max-cache-ttl ${toString cfg.maxCacheTtl}"
|
||||
++ optional (cfg.maxCacheTtlSsh != null)
|
||||
"max-cache-ttl-ssh ${toString cfg.maxCacheTtlSsh}"
|
||||
++ optional (cfg.pinentryFlavor != null)
|
||||
"pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry"
|
||||
++ optional (cfg.pinentryPackage != null)
|
||||
"pinentry-program ${lib.getExe pinentryPackage}"
|
||||
++ [ cfg.extraConfig ]);
|
||||
|
||||
home.sessionVariablesExtra = optionalString cfg.enableSshSupport ''
|
||||
|
|
|
@ -5,7 +5,7 @@ with lib;
|
|||
{
|
||||
config = {
|
||||
services.gpg-agent.enable = true;
|
||||
services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package.
|
||||
services.gpg-agent.pinentryPackage = null; # Don't build pinentry package.
|
||||
programs.gpg.enable = true;
|
||||
|
||||
test.stubs.gnupg = { };
|
||||
|
|
|
@ -5,7 +5,7 @@ with lib;
|
|||
{
|
||||
config = {
|
||||
services.gpg-agent.enable = true;
|
||||
services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package.
|
||||
services.gpg-agent.pinentryPackage = null; # Don't build pinentry package.
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "/path/to/hash";
|
||||
|
|
Loading…
Reference in a new issue