{ lib, config, pkgs, ... }: with lib; let psCfg = config.pub-solar; in { services.dbus.packages = [pkgs.gcr]; services.pcscd.enable = true; services.udev.packages = [pkgs.yubikey-personalization]; services.yubikey-agent.enable = true; hardware.gpgSmartcards.enable = true; # for yubikey services.gnome.gnome-keyring.enable = true; users.users."${psCfg.user.name}".packages = with pkgs; [ libsecret gnupg ]; programs.gnupg.agent = { enable = true; enableSSHSupport = true; pinentryFlavor = "gnome3"; }; home-manager.users."${psCfg.user.name}" = { home.file.".gnupg/scdaemon.conf".text = '' reader-port Yubico Yubi disable-ccid ''; }; }