home-manager/gpg/default.nix

42 lines
817 B
Nix
Raw Permalink Normal View History

2024-07-10 10:58:04 +00:00
{ pkgs, gpgSSHKeys, ... }:
2024-07-10 06:10:56 +00:00
{
services.gpg-agent = {
enable = true;
enableZshIntegration = true;
pinentryPackage = pkgs.pinentry-curses;
enableSshSupport = true;
2024-07-10 10:58:04 +00:00
sshKeys = gpgSSHKeys;
2024-07-10 06:10:56 +00:00
defaultCacheTtl = 3600 * 12;
defaultCacheTtlSsh = 3600 * 12;
maxCacheTtl = 3600 * 12;
maxCacheTtlSsh = 3600 * 12;
extraConfig = ''
allow-loopback-pinentry
'';
};
programs.gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
settings = {
pinentry-mode = "loopback";
};
publicKeys = [
{
source = ./molez.pub.asc;
trust = "ultimate";
}
{
source = ./vi-bim.pub.asc;
trust = "ultimate";
}
{
source = ./horsch.pub.asc;
trust = "ultimate";
}
];
};
}