2024-04-09 14:14:28 +03:00
|
|
|
{ pkgs, ... }: {
|
|
|
|
# GPG.
|
|
|
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|
|
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
2024-04-17 01:35:59 +03:00
|
|
|
pinentryPackage = pkgs.pinentry-tty;
|
2024-04-09 14:14:28 +03:00
|
|
|
};
|
|
|
|
|
2024-04-09 16:47:03 +03:00
|
|
|
# PCSC.
|
|
|
|
services.pcscd.enable = true;
|
|
|
|
|
|
|
|
# Yubikey touch notification.
|
|
|
|
programs.yubikey-touch-detector.enable = true;
|
|
|
|
|
2024-04-09 14:14:28 +03:00
|
|
|
# Extra packages.
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
yubikey-manager # Yubikey Manager.
|
2024-04-09 14:26:36 +03:00
|
|
|
# yubioath-desktop # OTP.
|
2024-04-09 14:14:28 +03:00
|
|
|
];
|
2024-04-09 14:26:36 +03:00
|
|
|
|
|
|
|
# Store GPG data on tmpfs.
|
|
|
|
environment.variables = {
|
|
|
|
# GNUPGHOME = "$(mktemp -d -t gnupg-$(date +%Y-%m-%d)-XXXXXXXXXX)";
|
|
|
|
};
|
2024-04-09 14:14:28 +03:00
|
|
|
}
|