Bruno BELANYI
4a01a50532
All checks were successful
ci/woodpecker/push/check Pipeline was successful
And fix the update `pinentry` options in home-manager.
32 lines
691 B
Nix
32 lines
691 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.my.home.gpg;
|
|
in
|
|
{
|
|
options.my.home.gpg = with lib; {
|
|
enable = my.mkDisableOption "gpg configuration";
|
|
|
|
pinentry = mkPackageOption pkgs "pinentry" { default = [ "pinentry-tty" ]; };
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.gpg = {
|
|
enable = true;
|
|
};
|
|
|
|
services.gpg-agent = {
|
|
enable = true;
|
|
enableSshSupport = true; # One agent to rule them all
|
|
pinentryPackage = cfg.pinentry;
|
|
extraConfig = ''
|
|
allow-loopback-pinentry
|
|
'';
|
|
};
|
|
|
|
home.shellAliases = {
|
|
# Sometime `gpg-agent` errors out...
|
|
reset-agent = "gpg-connect-agent updatestartuptty /bye";
|
|
};
|
|
};
|
|
}
|