lavaridge: added pam and fprint workarounds for proper fingerprint reader support in GDM

This commit is contained in:
Aly Raffauf 2024-03-15 11:20:54 -04:00
parent 8b28034d9a
commit fecc25d9a1

View file

@ -1,6 +1,6 @@
# Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD.
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
imports =
@ -23,6 +23,29 @@
zramSwap.enable = true;
zramSwap.memoryPercent = 25;
# Need to change the order pam loads its modules
# to get proper fingerprint behavior on GDM and the lockscreen.
security.pam.services.login.fprintAuth = false;
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
'';
};
services.fwupd.enable = true;
# # we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
# services.fwupd.package = (import (builtins.fetchTarball {