I have a Nitrokey USB smartcard. I use gpg --card-status
to check if it is working (if gpg is configured correctly). With my current NixOS configuration, this works.
But if I add the following snippet to start KeePassXC on login with GNOME, this changes.
{ config, pkgs, lib, ... }:
{
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
home.file.keepassxc = {
target = ".config/autostart/" + "org.keepassxc.KeePassXC" + ".desktop";
source = (pkgs.keepassxc + "/share/applications/" + "org.keepassxc.KeePassXC" + ".desktop");
};
};
}
After a reboot, KeePassXC is started on login. But gpg --card-status
gives the following message, which is the same as if no smartcard is attached:
gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device
I have no idea how I could debug this further … Any help is welcome.