Skip to content

Commit

Permalink
nixos/gnupg: define agent.pinentryFlavor statically
Browse files Browse the repository at this point in the history
We don't want to depend on the *enabled* flavors of pinentry but on all
*possible* ones.
  • Loading branch information
SuperSandro2000 committed Dec 29, 2023
1 parent 199678a commit 8d5922d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nixos/modules/programs/gnupg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ in
};

agent.pinentryFlavor = mkOption {
type = types.nullOr (types.enum pkgs.pinentry.flavors);
# keep in sync with all possible favlors of pinentry
type = types.nullOr (types.enum [ "curses" "tty" "emacs" "gtk2" "gnome3" "qt" ]);
example = "gnome3";
default = defaultPinentryFlavor;
defaultText = literalMD ''matching the configured desktop environment'';
Expand Down Expand Up @@ -232,7 +233,4 @@ in
}
];
};

# uses attributes of the linked package
meta.buildDocsInSandbox = false;
}
1 change: 1 addition & 0 deletions pkgs/tools/security/pinentry/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let
lib.optionalString (flag != null)
(lib.enableFeature (lib.elem f enabledFlavors) ("pinentry-" + flag));

# keep in sync with programs.gnupg.agent.pinentryFlavor
flavorInfo = {
curses = { bin = "curses"; flag = "curses"; buildInputs = [ ncurses ]; };
tty = { bin = "tty"; flag = "tty"; };
Expand Down

0 comments on commit 8d5922d

Please sign in to comment.