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

@ -22,8 +22,8 @@ in
};
graphics.cpuFlavor = cpuFlavor;
keychron.enable = true;
nitrokey.enable = true;
sound.enable = true;
thunderbolt.enable = true;
yubikey.enable = true;
};
}

View file

@ -9,7 +9,7 @@
./firmware
./graphics
./keychron
./nitrokey
./yubikey
./sound
./thunderbolt
];

View file

@ -1,20 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.hardware.nitrokey;
in
{
options.my.hardware.nitrokey = {
enable = lib.mkEnableOption "nitrokey configuration";
};
config = lib.mkIf cfg.enable {
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}

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
];
};
}