mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 18:04:41 +02:00
25 lines
524 B
Nix
25 lines
524 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
|
|
];
|
|
};
|
|
}
|