mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
28 lines
522 B
Nix
28 lines
522 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.hardware.yubikey;
|
|
in
|
|
{
|
|
options.my.hardware.yubikey = {
|
|
enable = lib.mkEnableOption "yubikey configuration";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
|
programs = {
|
|
ssh.startAgent = false;
|
|
gnupg.agent = {
|
|
enable = true;
|
|
enableSSHSupport = true;
|
|
};
|
|
};
|
|
services.pcscd.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [ yubikey-manager ];
|
|
};
|
|
}
|