hardware/yubikey: init from nitrokey

This commit is contained in:
Felix Buehler 2023-04-02 16:37:30 +02:00
parent ae77e8c649
commit 29b0fb499c
4 changed files with 26 additions and 22 deletions

View file

@ -0,0 +1,24 @@
{ 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;
};
};
environment.systemPackages = with pkgs; [
yubikey-manager
];
};
}