nixfleet/hmModules/gpg/default.nix
Andrea Ciceri a394b9cefd
All checks were successful
/ test (push) Successful in 32s
Reformat everything
2024-09-20 11:37:17 +02:00

31 lines
698 B
Nix

{ pkgs, ... }:
{
services.gpg-agent = {
enable = true;
enableSshSupport = true;
sshKeys = [ "CE2FD0D9BECBD8876811714925066CC257413416" ];
extraConfig =
let
pinentryRofi = pkgs.writeShellApplication {
name = "pinentry-rofi-with-env";
runtimeInputs = with pkgs; [
coreutils
rofi
];
text = ''
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
'';
};
in
''
allow-emacs-pinentry
allow-loopback-pinentry
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
'';
};
programs.gpg = {
enable = true;
settings = { };
};
}