mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 05:12:56 +00:00
d021baa1bb
required because they don't share all attributes
19 lines
575 B
Nix
19 lines
575 B
Nix
{ config, pkgs, lib, ... }: {
|
|
|
|
options.gpg.enable = lib.mkEnableOption "GnuPG encryption.";
|
|
|
|
config.home-manager.users.${config.user} = lib.mkIf config.gpg.enable {
|
|
programs.gpg.enable = true;
|
|
services.gpg-agent = {
|
|
enable = true;
|
|
defaultCacheTtl = 86400; # Resets when used
|
|
defaultCacheTtlSsh = 86400; # Resets when used
|
|
maxCacheTtl = 34560000; # Can never reset
|
|
maxCacheTtlSsh = 34560000; # Can never reset
|
|
pinentryFlavor = "tty";
|
|
};
|
|
home = lib.mkIf config.gui.enable { packages = with pkgs; [ pinentry ]; };
|
|
};
|
|
|
|
}
|