modularize yubikey

This commit is contained in:
Fabian Montero 2024-12-02 14:14:13 -06:00
parent d5afd4b1a7
commit 1221aaf0fc
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
4 changed files with 47 additions and 37 deletions

View file

@ -10,11 +10,12 @@
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./yubikey.nix
];
local.sys = {
baseline.enable = true;
yubikey.enable = true;
};
# Use the systemd-boot EFI boot loader.

View file

@ -1,36 +0,0 @@
{
config,
pkgs,
lib,
...
}: {
services = {
pcscd.enable = true;
udev.packages = [pkgs.yubikey-personalization];
};
environment.etc."pkcs11/modules/ykcs11".text = ''
module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so
'';
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
security.pam = {
services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
u2f = {
enable = true;
control = "sufficient";
settings = {
debug = false;
cue = true;
};
};
};
}