1
Fork 0
satellite/home/features/cli/gpg.nix

31 lines
544 B
Nix
Raw Normal View History

2023-07-18 22:58:42 +02:00
{ pkgs, config, ... }:
let
pinentry =
if config.gtk.enable then {
packages = [ pkgs.pinentry-gnome pkgs.gcr ];
name = "gnome3";
} else {
packages = [ pkgs.pinentry-curses ];
name = "curses";
};
in
{
home.packages = pinentry.packages;
# TODO: consider ssh support
services.gpg-agent = {
enable = true;
pinentryFlavor = pinentry.name;
};
programs.gpg = {
enable = true;
settings = {
trust-model = "tofu+pgp";
};
# publicKeys = [{
# trust = 5;
# }];
};
}