forked from fabian/nix_config
add yubikey support
This commit is contained in:
parent
6e9af8b303
commit
a6be515925
|
@ -45,6 +45,9 @@
|
||||||
vlc
|
vlc
|
||||||
vpsfree-client
|
vpsfree-client
|
||||||
vscodium-fhs
|
vscodium-fhs
|
||||||
|
yubikey-manager
|
||||||
|
yubico-pam
|
||||||
|
yubikey-personalization
|
||||||
zip
|
zip
|
||||||
zola
|
zola
|
||||||
zoom-us
|
zoom-us
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./yubikey.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
|
32
sys/platforms/posixlycorrect/yubikey.nix
Normal file
32
sys/platforms/posixlycorrect/yubikey.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.yubico = {
|
||||||
|
enable = true;
|
||||||
|
debug = false;
|
||||||
|
mode = "challenge-response";
|
||||||
|
id = ["27677315"];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue