1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

feat: Enable fingerprint authentication for login screen

- Added new `default.nix` file in `dell/xps/15-9530/fingerprint` directory
- Enabled `services.fprintd` service in the configuration
- Set up `tod` driver for fingerprint scanner
- Allowed password authentication for initial password login
- Configured fingerprint authentication for GDM login screen

[dell/xps/15-9530/fingerprint/default.nix]
- Add a new file `default.nix` in the `dell/xps/15-9530/fingerprint` directory
- Enable the `services.fprintd` service in the configuration
- Set up the `tod` driver for the fingerprint scanner
- Configured fingerprint authentication for the initial password login
- Configure fingerprint authentication for the GDM login screen
This commit is contained in:
bashfulrobot 2024-03-04 14:15:05 -08:00
parent c9121cc00a
commit 1224d0fb8d
No known key found for this signature in database
GPG key ID: 1650E57FA6D8AC37

View file

@ -0,0 +1,40 @@
{ pkgs, lib, config, ... }: {
environment.systemPackages = [
];
services.fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-goodix;
};
};
# Used to allow a password login on first login as an alternative to just a fingerprint
security.pam.services.login.fprintAuth = false;
# similarly to how other distributions handle the fingerprinting login
security.pam.services.gdm-fingerprint =
lib.mkIf (config.services.fprintd.enable) {
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
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
account include login
password required pam_deny.so
session include login
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
'';
};
}