.hive/modules/hardware/yubikey.nix

33 lines
601 B
Nix

{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.yubikey;
in {
options = {
hive.yubikey.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Yubikey support.";
};
};
config = lib.mkIf cfg.enable {
# Include udev rules for yubikey.
services.udev.packages = with pkgs; [
yubikey-personalization
];
# OTP Manager
environment.systemPackages = with pkgs; [
yubioath-flutter
];
services.pcscd.enable = true;
# Enable smartcard support
hardware.gpgSmartcards.enable = true;
};
}