nixos-config/home-manager/modules/gpg/default.nix

35 lines
567 B
Nix
Raw Normal View History

2024-02-05 11:46:52 +01:00
{
pkgs,
config,
lib,
...
2022-03-01 22:19:03 +01:00
}:
2024-02-05 11:46:52 +01:00
with lib;
let
2022-03-01 22:19:03 +01:00
cfg = config.eboskma.programs.gpg;
in
{
2021-11-17 16:32:18 +01:00
options.eboskma.programs.gpg = {
enable = mkEnableOption "enable gpg";
};
2022-05-03 18:17:38 +02:00
config = mkIf cfg.enable {
2024-02-05 11:46:52 +01:00
home.packages = with pkgs; [ pinentry-gnome ];
2021-11-17 16:32:18 +01:00
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
2021-11-21 19:07:12 +01:00
pinentryFlavor = "gnome3";
# enableSshSupport = true;
# defaultCacheTtlSsh = 14400;
# maxCacheTtlSsh = 14400;
extraConfig = ''
allow-loopback-pinentry
'';
2021-11-17 16:32:18 +01:00
};
};
}