dotfiles/modules/tools/gpg/default.nix
Alejandro Angulo 58efac7f13
Configured remote deployments
Also includes some misc fixes for bugs I ran into along the way.
2023-05-11 17:32:58 -07:00

41 lines
905 B
Nix

{
options,
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.aa.tools.gpg;
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"
];
};
};
};
}