nixos-config/modules/users/gpg/default.nix
2021-10-05 23:45:02 +02:00

32 lines
551 B
Nix

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.gpg;
in {
options.erwin.gpg = {
enable = mkOption {
description = "Enable GPG";
type = types.bool;
default = false;
};
};
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;
};
};
}