mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
26 lines
522 B
Nix
26 lines
522 B
Nix
|
|
{ pkgs, ...}:
|
||
|
|
|
||
|
|
{
|
||
|
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||
|
|
|
||
|
|
# FIXME Don't forget to create an authorization mapping file for your user (https://nixos.wiki/wiki/Yubikey#pam_u2f)
|
||
|
|
security.pam = {
|
||
|
|
u2f = {
|
||
|
|
enable = true;
|
||
|
|
cue = true;
|
||
|
|
control = "sufficient";
|
||
|
|
};
|
||
|
|
|
||
|
|
services = {
|
||
|
|
login.u2fAuth = true;
|
||
|
|
greetd.u2fAuth = true;
|
||
|
|
sudo.u2fAuth = true;
|
||
|
|
hyprlock.u2fAuth = true;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
environment.systemPackages = with pkgs; [
|
||
|
|
yubikey-manager
|
||
|
|
];
|
||
|
|
}
|