dotfiles/modules/tools/gpg/default.nix

41 lines
906 B
Nix
Raw Normal View History

2023-03-19 15:56:42 +00:00
{
options,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.aa.tools.git;
user = config.aa.user;
in {
options.aa.tools.gpg = with types; {
enable = mkEnableOption "gpg";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [gnupg pinentry-curses];
aa.home.extraOptions = {
programs.gpg = {
enable = true;
scdaemonSettings = {
# Fix conflicts with config in common/yubikey.nix
disable-ccid = true;
};
};
services.gpg-agent = {
enable = true;
pinentryFlavor = "curses";
enableZshIntegration = true; # TODO: Only set if using zsh
enableSshSupport = true;
sshKeys = [
# run `gpg-connect-agent 'keyinfo --list' /bye` to get these values for existing keys
"E274D5078327CB6C8C83CFF102CC12A2D493C77F"
];
};
};
};
}