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

28 lines
499 B
Nix
Raw Normal View History

2021-11-17 16:32:18 +01:00
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.programs.gpg;
in
{
options.eboskma.programs.gpg = {
enable = mkEnableOption "enable gpg";
};
config = mkIf (cfg.enable) {
home.packages = with pkgs; [
pinentry-curses
];
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
pinentryFlavor = "curses";
enableSshSupport = true;
defaultCacheTtlSsh = 14400;
maxCacheTtlSsh = 14400;
};
};
}