mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds yubikey u2f auth
This commit is contained in:
parent
d067a385b1
commit
64f737ee3d
1 changed files with 25 additions and 0 deletions
25
modules/home/yubikey.nix
Normal file
25
modules/home/yubikey.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ 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
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue