feat: inital public commit
This commit is contained in:
32
host/common/optional/yubikey.nix
Normal file
32
host/common/optional/yubikey.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubioath-flutter # gui
|
||||
yubikey-manager # `ykman`
|
||||
pam_u2f # yubikey with sudo
|
||||
];
|
||||
|
||||
services.pcscd.enable = true;
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
services.yubikey-agent.enable = true;
|
||||
|
||||
security.pam = {
|
||||
sshAgentAuth.enable = true;
|
||||
u2f = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cue = true;
|
||||
authFile = "/home/max/.config/Yubico/u2f_keys";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
login.u2fAuth = true;
|
||||
sudo = {
|
||||
u2fAuth = true;
|
||||
sshAgentAuth = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user