2023-09-28 19:47:00 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf mkForce;
|
|
|
|
in {
|
|
|
|
services.fprintd.enable = true;
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = mkForce true;
|
|
|
|
|
|
|
|
security.pam.services = {
|
|
|
|
sudo.fprintAuth = true;
|
2023-09-28 19:51:11 +01:00
|
|
|
login.fprintAuth = true;
|
2023-09-28 19:47:00 +01:00
|
|
|
|
2024-03-10 17:26:18 +00:00
|
|
|
gdm-fingerprint = mkIf config.services.xserver.displayManager.gdm.enable {
|
2023-09-28 19:47:00 +01:00
|
|
|
text = ''
|
|
|
|
auth required pam_shells.so
|
|
|
|
auth requisite pam_nologin.so
|
|
|
|
auth requisite pam_faillock.so preauth
|
|
|
|
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
|
|
|
auth optional pam_permit.so
|
|
|
|
auth required pam_env.so
|
|
|
|
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
|
2023-09-28 19:51:11 +01:00
|
|
|
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
2023-09-28 19:47:00 +01:00
|
|
|
|
|
|
|
account include login
|
|
|
|
|
|
|
|
password required pam_deny.so
|
|
|
|
|
|
|
|
session include login
|
2023-09-28 19:51:11 +01:00
|
|
|
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
2023-09-28 19:47:00 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|