blob: f4f1a338aabb96fc15a3823b2c0964782792c099 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{
config,
lib,
pkgs,
osConfig,
...
}: let
cfg = config.getchoo.programs.gpg;
inherit (lib) mkEnableOption mkIf;
in {
options.getchoo.programs.gpg.enable = mkEnableOption "gpg" // {default = true;};
config = mkIf cfg.enable {
programs.gpg.enable = true;
services.gpg-agent = lib.mkIf pkgs.stdenv.isLinux {
enable = true;
enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
pinentryFlavor =
if osConfig ? programs
then osConfig.programs.gnupg.agent.pinentryFlavor or "curses"
else "curses";
};
};
}
|