nixos-configuration/modules/yubikey-gpg.nix
2024-06-14 16:26:22 +02:00

29 lines
606 B
Nix

{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.jalr.workstation.enable {
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = with pkgs; if config.jalr.gui.enable then pinentry-gnome3 else pinentry-tty;
};
};
services = {
pcscd.enable = true;
udev.packages = with pkgs; [
yubikey-personalization
];
};
environment = {
systemPackages = with pkgs; [
gnupg
yubikey-manager
yubikey-personalization
];
};
};
}