✨ Moved yubikey config to security dir and rename
This commit is contained in:
32
shared/modules/security/yubikey.nix
Normal file
32
shared/modules/security/yubikey.nix
Normal file
@ -0,0 +1,32 @@
|
||||
# Yubikey config: https://nixos.wiki/wiki/Yubikey#pam_u2f
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
yubioath-flutter # GUI
|
||||
];
|
||||
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
security = {
|
||||
pam = {
|
||||
services = {
|
||||
login.u2fAuth = false; # U2F and password
|
||||
sudo.u2fAuth = true; # U2F or password
|
||||
};
|
||||
u2f = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cue = true; # Prompt: Please touch the device
|
||||
interactive = false; # Prompt: Insert your U2F device, then press ENTER.
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
pcscd.enable = true; # Required for Yubikey
|
||||
udev.packages = with pkgs; [ yubikey-personalization ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user