home: gpg: make pinentry configurable
This commit is contained in:
parent
2dbb25a9e3
commit
f96bc19bf6
13
home/gpg.nix
13
home/gpg.nix
|
@ -3,8 +3,15 @@ let
|
|||
cfg = config.my.home.gpg;
|
||||
in
|
||||
{
|
||||
options.my.home.gpg = with lib.my; {
|
||||
enable = mkDisableOption "gpg configuration";
|
||||
options.my.home.gpg = with lib; {
|
||||
enable = my.mkDisableOption "gpg configuration";
|
||||
|
||||
pinentry = mkOption {
|
||||
type = types.str;
|
||||
default = "tty";
|
||||
example = "gtk2";
|
||||
description = "Which pinentry interface to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -15,7 +22,7 @@ in
|
|||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true; # One agent to rule them all
|
||||
pinentryFlavor = "tty";
|
||||
pinentryFlavor = cfg.pinentry;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue